home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr12 / pplasc.zip / PPL2.ASC < prev    next >
Text File  |  1993-06-04  |  246KB  |  6,744 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                           
  10.  
  11.  
  12.  
  13.             PPL Reference
  14.  
  15.  
  16.                Lists by Type
  17.                       PPL is composed of  basically five different token  types.  They
  18.                           are constants, functions, statements, types, and variables.
  19.  
  20.                        Constant List
  21.                                          AUTO
  22.                                          BELL
  23.                                          DEFS
  24.                                        ECHODOTS
  25.                                       ERASELINE
  26.                                         FALSE
  27.                                          FCL
  28.                                        FIELDLEN
  29.                                          FNS
  30.                                         F_EXP
  31.                                          F_MW
  32.                                         F_REG
  33.                                         F_SEL
  34.                                         F_SYS
  35.                                         GRAPH
  36.                                         GUIDE
  37.                                       HIGHASCII
  38.                                          LANG
  39.                                        LFAFTER
  40.                                        LFBEFORE
  41.                                         LOGIT
  42.                                       LOGITLEFT
  43.                                           NC
  44.                                        NEWLINE
  45.                                        NOCLEAR
  46.                                          O_RD
  47.                                          O_RW
  48.                                          O_WR
  49.                                          SEC
  50.                                        STACKED
  51.                                          S_DB
  52.                                          S_DN
  53.                                          S_DR
  54.                                          S_DW
  55.                                          TRUE
  56.                                         UPCASE
  57.                                        WORDWRAP
  58.                                         YESNO
  59.  
  60.  
  61.  
  62.                        Function List
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                           
  71.  
  72.                                                 ABORT
  73.                                          ABS
  74.                                          AND
  75.                                         ANSION
  76.                                          ASC
  77.                                          B2W
  78.                                         CALLID
  79.                                        CALLNUM
  80.                                        CARRIER
  81.                                         CCTYPE
  82.                                          CDON
  83.                                          CHR
  84.                                        CURCOLOR
  85.                                        CURCONF
  86.                                         CURSEC
  87.                                          DATE
  88.                                          DAY
  89.                                        DBGLEVEL
  90.                                        DEFCOLOR
  91.                                          DOW
  92.                                         EXIST
  93.                                          FERR
  94.                                        FILEINF
  95.                                         FMTCC
  96.                                         GETENV
  97.                                        GETTOKEN
  98.                                          GETX
  99.                                          GETY
  100.                                        GRAFMODE
  101.                                        HELPPATH
  102.                                          HOUR
  103.                                          I2S
  104.                                         INKEY
  105.                                         INSTR
  106.                                         KINKEY
  107.                                        LANGEXT
  108.                                          LEFT
  109.                                          LEN
  110.                                        LOGGEDON
  111.                                         LOWER
  112.                                         LTRIM
  113.                                       MASK_ALNUM
  114.                                       MASK_ALPHA
  115.                                       MASK_ASCII
  116.                                       MASK_FILE
  117.                                        MASK_NUM
  118.                                       MASK_PATH
  119.                                        MASK_PWD
  120.                                        MAXNODE
  121.                                        MGETBYTE
  122.                                          MID
  123.                                          MIN
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.                           
  132.  
  133.                                                 MINKEY
  134.                                        MINLEFT
  135.                                         MINON
  136.                                         MKADDR
  137.                                         MKDATE
  138.                                         MODEM
  139.                                         MONTH
  140.                                         NOCHAR
  141.                                          NOT
  142.                                        ONLOCAL
  143.                                           OR
  144.                                        PAGESTAT
  145.                                         PCBDAT
  146.                                        PCBNODE 
  147.                                         PEEKB
  148.                                         PEEKDW
  149.                                         PEEKW
  150.                                        PPENAME
  151.                                        PPEPATH
  152.                                          PSA
  153.                                         RANDOM
  154.                                        READLINE
  155.                                         REGAH
  156.                                         REGAL
  157.                                         REGAX
  158.                                         REGBH
  159.                                         REGBL
  160.                                         REGBX
  161.                                         REGCF
  162.                                         REGCH
  163.                                         REGCL
  164.                                         REGCX
  165.                                         REGDH
  166.                                         REGDI
  167.                                         REGDL
  168.                                         REGDS
  169.                                         REGDX
  170.                                         REGES
  171.                                          REGF
  172.                                         REGSI
  173.                                        REPLACE
  174.                                         RIGHT
  175.                                         RTRIM
  176.                                          S2I
  177.                                        SCRTEXT
  178.                                          SEC
  179.                                        SHOWSTAT
  180.                                         SLPATH
  181.                                         SPACE
  182.                                         STRING
  183.                                         STRIP
  184.                                        STRIPATX
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                           
  193.  
  194.                                                SYSOPSEC
  195.                                        TEMPPATH
  196.                                          TIME
  197.                                         TIMEAP
  198.                                        TOKCOUNT
  199.                                        TOKENSTR
  200.                                          TRIM
  201.                                         UPPER
  202.                                        UN_CITY
  203.                                        UN_NAME
  204.                                        UN_OPER
  205.                                        UN_STAT
  206.                                         U_BDL
  207.                                        U_BDLDAY
  208.                                         U_BUL
  209.                                         U_FDL
  210.                                         U_FUL
  211.                                        U_INCONF
  212.                                        U_LDATE
  213.                                         U_LDIR
  214.                                        U_LOGONS
  215.                                        U_LTIME
  216.                                        U_MSGRD
  217.                                        U_MSGWR
  218.                                         U_NAME
  219.                                       U_PWDHIST
  220.                                        U_PWDLC
  221.                                        U_PWDTC
  222.                                        U_RECNUM
  223.                                         U_STAT
  224.                                        U_TIMEON
  225.                                         VALCC
  226.                                        VALDATE
  227.                                        VALTIME
  228.                                          VER
  229.                                          XOR
  230.                                          YEAR
  231.                                        YESCHAR
  232.  
  233.  
  234.                        Statement List
  235.  
  236.                                        ADJTIME
  237.                                        ANSIPOS
  238.                                         BACKUP
  239.                                          BLT
  240.                                       BROADCAST
  241.                                          BYE
  242.                                          CALL
  243.                                        CDCHKOFF
  244.                                        CDCHKON
  245.                                          CHAT
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.                           
  254.  
  255.                                                CLOSECAP
  256.                                         CLREOL
  257.                                          CLS
  258.                                         COLOR
  259.                                        CONFFLAG
  260.                                       CONFUNFLAG
  261.                                        DBGLEVEL
  262.                                          DEC
  263.                                        DEFCOLOR
  264.                                         DELAY
  265.                                         DELETE
  266.                                        DELUSER
  267.                                          DIR
  268.                                        DISPFILE
  269.                                        DISPSTR
  270.                                        DISPTEXT
  271.                                         DOINTR
  272.                                         DTROFF
  273.                                         DTRON
  274.                                          ELSE
  275.                                         ELSEIF
  276.                                          END
  277.                                         ENDIF
  278.                                        ENDWHILE
  279.                                        FAPPEND
  280.                                         FCLOSE
  281.                                        FCREATE
  282.                                          FGET
  283.                                         FOPEN
  284.                                          FOR
  285.                                        FORWARD
  286.                                          FPUT
  287.                                         FPUTLN
  288.                                        FPUTPAD
  289.                                       FRESHLINE
  290.                                        FREWIND
  291.                                        GETTOKEN
  292.                                        GETUSER
  293.                                        GOODBYE
  294.                                         GOSUB
  295.                                          GOTO
  296.                                         HANGUP
  297.                                           IF
  298.                                          INC
  299.                                         INPUT
  300.                                        INPUTCC
  301.                                       INPUTDATE
  302.                                        INPUTINT
  303.                                       INPUTMONEY
  304.                                        INPUTSTR
  305.                                       INPUTTEXT
  306.                                       INPUTTIME
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.                           
  315.  
  316.                                                INPUTYN
  317.                                          JOIN
  318.                                       KBDCHKOFF
  319.                                        KBDCHKON
  320.                                        KBDFILE
  321.                                        KBDSTUFF
  322.                                          LET
  323.                                          LOG
  324.                                        MESSAGE
  325.                                          MORE
  326.                                         MPRINT
  327.                                        MPRINTLN
  328.                                        NEWLINE
  329.                                        NEWLINES
  330.                                         NEWPWD
  331.                                          NEXT
  332.                                        OPENCAP
  333.                                         OPTEXT
  334.                                        PAGEOFF
  335.                                         PAGEON
  336.                                         POKEB
  337.                                         POKEDW
  338.                                         POKEW
  339.                                          POP
  340.                                         PRINT
  341.                                        PRINTLN
  342.                                       PROMPTSTR
  343.                                          PUSH
  344.                                        PUTUSER
  345.                                         QUEST
  346.                                         RDUNET
  347.                                         RDUSYS
  348.                                         RENAME
  349.                                       RESETDISP
  350.                                        RESTSCRN
  351.                                         RETURN
  352.                                        SAVESCRN
  353.                                       SENDMODEM
  354.                                         SHELL
  355.                                        SHOWOFF
  356.                                         SHOWON
  357.                                         SOUND
  358.                                         SPRINT
  359.                                        SPRINTLN
  360.                                       STARTDISP
  361.                                          STOP
  362.                                        TOKENIZE
  363.                                        VARADDR
  364.                                         VAROFF
  365.                                         VARSEG
  366.                                          WAIT
  367.                                        WAITFOR
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.                           
  376.  
  377.                                                 WHILE
  378.                                         WRUNET
  379.                                         WRUSYS
  380.  
  381.  
  382.                        Type List
  383.  
  384.                                        BOOLEAN
  385.                                          DATE
  386.                                        INTEGER
  387.                                         MONEY
  388.                                         STRING
  389.                                          TIME
  390.  
  391.  
  392.                        Variable List
  393.                                         U_CLS
  394.                                        U_DEF79
  395.                                        U_EXPERT
  396.                                         U_FSE
  397.                                         U_FSEP
  398.                                       U_LONGHDR
  399.                                        U_SCROLL
  400.                                       U_EXPDATE
  401.                                        U_PWDEXP
  402.                                        U_EXPSEC
  403.                                       U_PAGELEN
  404.                                         U_SEC
  405.                                       U_ADDR(5)
  406.                                        U_ALIAS
  407.                                       U_BDPHONE
  408.                                         U_CITY
  409.                                        U_CMNT1
  410.                                        U_CMNT2
  411.                                       U_HVPHONE
  412.                                       U_NOTES(4)
  413.                                         U_PWD
  414.                                        U_TRANS
  415.                                         U_VER
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.                           
  424.  
  425.  
  426.  
  427.                   Lists by Category
  428.                       Unknown what lists will be necessary at this time.
  429.  
  430.                        ??? List
  431.                       ???
  432.  
  433.                        ??? List
  434.                       ???
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.                           
  443.  
  444.  
  445.  
  446.                   ABORT()   Function
  447.  
  448.                    Function
  449.                       Returns  a flag indicating  whether or not the  user has aborted
  450.                           the display of information.
  451.  
  452.                        Syntax
  453.                       ABORT()
  454.                                 No arguments are required
  455.  
  456.                        Return Type & Value
  457.  
  458.                       BOOLEAN     If the user  has aborted the display  of information
  459.                           by answering  no to  a MORE?  prompt  or by  hitting ^K  or  ^X
  460.                           display,  this  function  returns  TRUE.    Otherwise  FALSE  is
  461.                           returned.
  462.                        Remarks
  463.  
  464.                       Unless specifically disabled, the user can abort any display  at
  465.                           any  time by hitting  ^K or  ^X or by  answering no  to a MORE?
  466.                           prompt.  If  the user does  this, PCBoard will  not display  any
  467.                           further information until the display is reset via the RESETDISP
  468.                           statement.  This function should be checked occasionally  during
  469.                           long displays of  information to determine if the user  wants to
  470.                           abort.  If  the function returns TRUE, you should  stop printing
  471.                           information and continue with the next part of the program after
  472.                           using RESETDISP.
  473.                        Examples
  474.  
  475.                         INTEGER I
  476.                         STARTDISP FCL
  477.                         ' While the user has not aborted, continue
  478.                         WHILE (!ABORT()) DO
  479.                           PRINTLN "I is equal to ",I
  480.                           INC I
  481.                         ENDWHILE
  482.                         RESETDISP
  483.  
  484.                    See Also
  485.                       RESETDISP Statement, STARTDISP Statement
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.                           
  494.  
  495.  
  496.  
  497.                   ABS()   Function
  498.  
  499.                    Function
  500.                       Returns the absolute value of an integer expression.
  501.  
  502.                        Syntax
  503.                       ABS(iexp)
  504.                                 iexp Any integer expression.
  505.  
  506.                        Return Type & Value
  507.  
  508.                       INTEGER     If iexp is greater than or equal to 0, this function
  509.                           returns iexp.  Otherwise this function returns -iexp.
  510.                        Remarks
  511.  
  512.                       The  most significant use  of the absolute value  function is to
  513.                           determine the difference between  two values.  For  example, you
  514.                           may need to  know in a program the difference  between 8 and 13.
  515.                           Normal subtraction would yield a result of -5 (8-13).  You don't
  516.                           need the mathematical  difference though, you  need the  logical
  517.                           difference  between  the  two  integers.    The  absolute  value
  518.                           function will return that.   In other  words, while 8-13 is  -5,
  519.                           ABS(8-13) is  5, which  may be a  more desirable result  in many
  520.                           cases.  Also, it is easier to code and understand than this:
  521.                              INTEGER D
  522.                         LET D = 8-13
  523.                         IF (D < 0) LET D = -D
  524.  
  525.                    Examples
  526.  
  527.                         INTEGER num
  528.                         ' Loop while num is < 6 or num > 10
  529.                         ' ... ABS(4-8)=4 ABS( 5-8)=3 ABS( 6-8)=2 ABS( 7-
  530.                         8)=1
  531.                         '     ABS(9-8)=1 ABS(10-8)=2 ABS(11-8)=3 ABS(12-
  532.                         8)=4 ...
  533.                         WHILE (ABS(num-8) > 2) DO
  534.                           PRINTLN "Enter a number from 6 to 10:"
  535.                           INPUT "Number",num
  536.                         ENDWHILE
  537.  
  538.                         INTEGER i, r
  539.                         ' Generate 10 random numbers from -5 to 5
  540.                         ' Print each number and it's absolute value
  541.                         FOR i = 1 TO 10
  542.                           LET r = RANDOM(10)-5
  543.                           PRINTLN "The absolute value of ",r," is ",ABS(r)
  544.                         NEXT
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.                       
  553.  
  554.                    See Also
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.                           
  563.  
  564.  
  565.  
  566.                   ADJTIME   Statement
  567.  
  568.                    Function
  569.                       Adjust the users time up or down.
  570.  
  571.                        Syntax
  572.                       ADJTIME minutes
  573.                                 minutes   An integer expression containing the number of
  574.                           minutes that the users time left should be adjusted by.  A value
  575.                           greater than  0 will add time;  a value less than  0 will deduct
  576.                           time.
  577.  
  578.                        Remarks
  579.  
  580.                       Use  this statement to  reward (or penalize) the  user with more
  581.                           (or  less)  time  based  on any  condition  or  event you  wish.
  582.                           However, the added/deducted time is only applied to the  current
  583.                           call.   It  will not  be remembered after  the caller  hangs up,
  584.                           except that it will be reflected in the time online today.   For
  585.                           example, if a caller has a normal  daily limit of 30 minutes and
  586.                           you  add 15 minutes, they can stay  online for up to 45 minutes.
  587.                           If  they only stay online  for 15 minutes and  hangup, they will
  588.                           only have 15 minutes left at the beginning of the next call, not
  589.                           30; the  added time  isn't saved.   If they  stay online for  40
  590.                           minutes  though,  it will  have given  them their  entire normal
  591.                           allotment  of time plus 10 of the 15 extra minutes.  If they try
  592.                           to call back  to use their last 5 minutes  they will not be able
  593.                           to because PCBoard will see that they've used their entire daily
  594.                           time limit plus 10 minutes.  The last 5 minutes wasn't saved.
  595.                        Examples
  596.  
  597.                         STRING yn
  598.                         INPUTYN "Do you wish to gamble 5 minutes for
  599.                         10",yn,@X0E
  600.                         IF (yn = YESCHAR()) THEN
  601.                           IF (RANDOM(1) = 1) THEN
  602.                             PRINTLN "You *WON*!  10 extra minutes awarded .
  603.                         . ."
  604.                             ADJTIME 10
  605.                           ELSE
  606.                             PRINTLN "You lost.  Sorry, but I have to take 5
  607.                         minutes now . . ."
  608.                             ADJTIME -5
  609.                           ENDIF
  610.                         ELSE
  611.                           PRINTLN "Chicken!  :)"
  612.                         ENDIF
  613.  
  614.                    See Also
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.                           
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.                           
  631.  
  632.  
  633.  
  634.                   AND()   Function
  635.  
  636.                    Function
  637.                       Calculate the bitwise AND of two integer arguments.
  638.  
  639.                        Syntax
  640.                       AND(iexp1,iexp2)
  641.                                 iexp1     Any integer expression.
  642.  
  643.                                 iexp2     Any integer expression.
  644.  
  645.                        Return Type & Value
  646.                       INTEGER     Returns the bitwise AND of iexp1 and iexp2.
  647.  
  648.                        Remarks
  649.                       This function may be used  to clear selected bits in  an integer
  650.                           expression  by ANDing  the expression with  a mask that  has the
  651.                           bits to clear set to 0 and the bits to ignore set to 1.  Another
  652.                           use is to calculate the  remainder of a division operation by  a
  653.                           power of two by ANDing the dividend with  the power of two minus
  654.                           one.
  655.  
  656.                        Examples
  657.                         ' Clear the high word, keeping only the low word
  658.                         PRINTLN "07FFFFFFFh AND 0FFFFh =
  659.                         ",AND(07FFFFFFFh,0FFFFh)
  660.                         ' In this case 123%16 = AND(123,15) (15 = 1111b)
  661.                         PRINTLN "The remainder of 123 divided by 16 is
  662.                         ",AND(123,1111b)
  663.  
  664.                    See Also
  665.  
  666.                       NOT() Function, OR() Function, XOR() Function
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.                           
  675.  
  676.  
  677.  
  678.                   ANSION()   Function
  679.  
  680.                    Function
  681.                       Report the status of ANSI availability with the current caller.
  682.  
  683.                        Syntax
  684.                       ANSION()
  685.                                 No arguments are required
  686.  
  687.                        Return Type and Value
  688.  
  689.                       BOOLEAN     If   the  caller  can  support  ANSI  then  TRUE  is
  690.                           returned, otherwise FALSE is returned.
  691.                        Remarks
  692.  
  693.                       This  function  will   return  TRUE  if  the   caller  has  ANSI
  694.                           capabilities.   This could have been determined one of two ways.
  695.                           If the user answered yes to the Do you want graphics? prompt
  696.                           this function will return TRUE.  If the  user answered no, there
  697.                           is still a  chance that the user has ANSI  capabilities; PCBoard
  698.                           will  interrogate the  remote computer  to find  out if  ANSI is
  699.                           available.  If  it is, this function will return TRUE.  Finally,
  700.                           if the user answered no and PCBoard was unable to detect ANSI at
  701.                           login this function will return FALSE.   There is still a chance
  702.                           that  the user could support ANSI but  the only safe approach at
  703.                           this point is to assume that there is no ANSI available.
  704.                        Examples
  705.  
  706.                         IF (ANSION()) PRINTLN "You have ANSI support
  707.                         available!"
  708.  
  709.                    See Also
  710.                       ANSIPOS Statement,  BACKUP Statement, FORWARD  Statement, GETX()
  711.                           Function, GETY() Function, GRAFMODE() Function
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.                           
  720.  
  721.  
  722.  
  723.                   ANSIPOS   Statement
  724.  
  725.                    Function
  726.                       Position  the cursor  anywhere  on  the  screen  using  an  ANSI
  727.                           positioning escape sequence.
  728.  
  729.                        Syntax
  730.                       ANSIPOS xpos, ypos
  731.                                 xpos An  integer expression  with  the  screen column  (x
  732.                           position) in  which to  place the cursor.   Valid columns  are 1
  733.                           through 80.
  734.  
  735.                                 ypos An   integer  expression  with  the  screen  row  (y
  736.                           position)  on which  to  place the  cursor.   Valid  rows  are 1
  737.                           through 23.
  738.  
  739.                        Remarks
  740.                       This statement will position  the cursor to the specified  (X,Y)
  741.                           coordinate on the screen but only if the current caller has ANSI
  742.                           support.   If you are writing  a program that will  require ANSI
  743.                           positioning, check  the value of the ANSION() function.  If ANSI
  744.                           is not available, this statement will be ignored.
  745.                        Examples
  746.  
  747.                         CLS
  748.                         IF (ANSION()) THEN
  749.                           ANSIPOS 1,1
  750.                           PRINTLN "This starts at (1,1)"
  751.                           ANSIPOS 3,3
  752.                           PRINTLN "This starts at (3,3)"
  753.                           ANSIPOS 2,2
  754.                           PRINTLN "And *THIS* starts at (2,2)"
  755.                         ENDIF
  756.  
  757.                    See Also
  758.  
  759.                       ANSION() Function,  BACKUP Statement, FORWARD  Statement, GETX()
  760.                           Function, GETY() Function, GRAFMODE() Function
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.                           
  769.  
  770.  
  771.  
  772.                   ASC()   Function
  773.  
  774.                    Function
  775.                       Converts a character to it's ASCII code.
  776.  
  777.                        Syntax
  778.                       ASC(sexp)
  779.                                 sexp Any string expression.
  780.  
  781.                        Return Type & Value
  782.  
  783.                       INTEGER     Returns the  ASCII code  of the  first character  of
  784.                           sexp (1-255) or 0 if sexp is an empty string.
  785.                        Remarks
  786.  
  787.                       In other languages (such as  BASIC) you can have any of  the 256
  788.                           possible  ASCII codes  (0-255)  in a  string.   In  PPL  you are
  789.                           limited  to  255 codes  (1-255)  because  ASCII  0  is  used  to
  790.                           terminate  strings and can't  appear in the middle  of a string.
  791.                           So,  if you  ever get  a 0  returned from  this function,  it is
  792.                           because you passed it an empty string.
  793.                        Examples
  794.  
  795.                         PRINTLN "The ASCII code for S is ",ASC("S")
  796.                         ' Convert a lowercase s to uppercase
  797.                         STRING s
  798.                         LET s = CHR(ASC("s")-ASC("a")+ASC("A"))
  799.  
  800.                    See Also
  801.                       CHR() Function
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.                           
  810.  
  811.  
  812.  
  813.                   AUTO   Constant
  814.  
  815.                    Function
  816.                       Set the auto answer flag in an INPUTSTR or PROMPTSTR statement.
  817.  
  818.                        Value
  819.                       8192 = 10000000000000b = 20000o = 2000h
  820.  
  821.                        Remarks
  822.                       The  INPUTSTR and  PROMPTSTR  statements  have  the  ability  to
  823.                           automatically answer themselves  if left alone  for 20  seconds.
  824.                           It  can be especially useful  if you are writing  a program that
  825.                           should work with  automated systems; use  the AUTO constant  and
  826.                           the  question will  automatically be  answered after  20 seconds
  827.                           just in case  the automation system doesn't know what to do with
  828.                           it.
  829.  
  830.                        Examples
  831.  
  832.                         STRING ans
  833.                         LET ans = NOCHAR()
  834.                         INPUTSTR "Run program now",ans,@X0E,1,"",AUTO+YESNO
  835.                         IF (ans = NOCHAR()) END
  836.  
  837.                    See Also
  838.                       INPUTSTR Statement, PROMPTSTR Statement
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.                           
  847.  
  848.  
  849.  
  850.                   B2W()   Function
  851.  
  852.                    Function
  853.                       Convert  two  byte-sized  arguments  into  a  single  word-sized
  854.                           argument.
  855.  
  856.                        Syntax
  857.                       B2W(iexp1,iexp2)
  858.                                 iexp1     Any integer  expression with  a value  between
  859.                           000h and 0FFh.
  860.  
  861.                                 iexp2     Any  integer expression  with a  value between
  862.                           000h and 0FFh.
  863.  
  864.                        Return Type & Value
  865.                       INTEGER     Returns   a  word-sized  value  between  00000h  and
  866.                           0FFFFh.    The  return  value  is  computed   by  the  following
  867.                           expression:  iexp1+iexp2*0100h.
  868.  
  869.                        Remarks
  870.                       It is  sometimes necessary to combine two bytes together to form
  871.                           a word.  This function simplifies that process, and speeds it up
  872.                           a little as well by doing it internally instead of requiring you
  873.                           to perform the arithmetic yourself.  It can be especially useful
  874.                           when used with the DOINTR statement.
  875.  
  876.                        Examples
  877.                         ' This line will display 25 *'s at the current
  878.                         screen position
  879.                         ' NOTES:  10h is the Video BIOS interrupt
  880.                         '         B2W(ASC("*"),09h) is the char to print
  881.                         and the service number
  882.                         '         0007h is video page 0, attribute 7
  883.                         '         25 is the number of characters to print
  884.                         '         All others are 0 and not needed for this
  885.                         function
  886.                         DOINTR 10h,B2W(09h,ASC("*")),0007h,25,0,0,0,0,0,0
  887.  
  888.                    See Also
  889.  
  890.                       DOINTR Statement
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.                           
  899.  
  900.  
  901.  
  902.                   BACKUP   Statement
  903.  
  904.                    Function
  905.                       Move the cursor backward a specified number of columns.
  906.  
  907.                        Syntax
  908.                       BACKUP numcols
  909.                                 numcols   An integer expression of the number of columns
  910.                           to move backward.  Valid values are 1 through 79.
  911.  
  912.                        Remarks
  913.  
  914.                       This  statement will move the cursor backward, nondestructively,
  915.                           a specified  number of columns.   It will  work with or  without
  916.                           ANSI.    If  ANSI  is available  (as  reported  by the  ANSION()
  917.                           function)  then  it  will  use  an   ANSI  positioning  command;
  918.                           otherwise  it  will  use  the  specified   number  of  backspace
  919.                           characters.   ANSI is  usually faster,  but backspace characters
  920.                           will get the  job done.  Note that you  cannot use this function
  921.                           to move  beyond column 1; to do  so would require ANSI.   So, if
  922.                           the cursor is  already in column 1  this statement will  have no
  923.                           effect.  And if the cursor is in column 80 the maximum you could
  924.                           move backward would be 79 (column 80 - 79 columns = column 1).
  925.                        Examples
  926.  
  927.                         PRINT "Rolling dice -- "
  928.                         FOR i = 1 TO 10
  929.                           LET d1 = RANDOM(5)+1
  930.                           LET d2 = RANDOM(5)+1
  931.                           PRINT d1,"-",d2
  932.                           BACKUP 3
  933.                         NEXT
  934.                         NEWLINE
  935.  
  936.                    See Also
  937.                       ANSION()  Function, ANSIPOS Statement, FORWARD Statement, GETX()
  938.                           Function, GETY() Function, GRAFMODE() Function
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.                           
  947.  
  948.  
  949.  
  950.                   BELL   Constant
  951.  
  952.                    Function
  953.                       Set the bell flag in a DISPTEXT statement.
  954.  
  955.                        Value
  956.                       2048 = 100000000000b = 4000o = 800h
  957.  
  958.                        Remarks
  959.                       The  DISPTEXT statement has  the ability to sound  a bell before
  960.                           displaying the actual text of a prompt.  This is useful when you
  961.                           want to get the users attention when displaying information.  It
  962.                           sends a  ^G (ASCII 7) character to the  remote caller and sounds
  963.                           the  alarm  on the  local computer  running PCBoard  (unless the
  964.                           alarm has been toggled  off).  It  is the responsibility of  the
  965.                           users terminal software to support the ^G.
  966.  
  967.                        Examples
  968.  
  969.                         ' Get the users attention and display the closed
  970.                         board prompt
  971.                         DISPTEXT 11,BELL+LFAFTER+LFBEFORE
  972.  
  973.                    See Also
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.                           
  982.  
  983.  
  984.  
  985.                   BLT   Statement
  986.  
  987.                    Function
  988.                       Display a specified bulletin number to the user.
  989.  
  990.                        Syntax
  991.                       BLT bltnum
  992.                                 bltnum    The  number of the bulletin  to display to the
  993.                           user.    Valid values  are  1  through the  number  of bulletins
  994.                           available.
  995.  
  996.                        Remarks
  997.  
  998.                       This statement will  display a specified bulletin  number to the
  999.                           user.    The BLT.LST  file  for the  current conference  will be
  1000.                           searched  for the bulletin.   If the bulletin  number is invalid
  1001.                           (less  than 1  or  greater  than  the  highest  bulletin  number
  1002.                           defined) then nothing will be displayed.
  1003.                        Examples
  1004.  
  1005.                         INTEGER num
  1006.                         INPUT "Bulletin to view",num
  1007.                         BLT num
  1008.  
  1009.                    See Also
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.                           
  1018.  
  1019.  
  1020.  
  1021.                   BOOLEAN   Type
  1022.  
  1023.                    Function
  1024.                       Declare one or more variables of type boolean.
  1025.  
  1026.                        Syntax
  1027.                       BOOLEAN var|arr(s[,s[,s]])[,var|arr(s[,s[,s]])]
  1028.                                 var  The name of a variable to  declare.  Must start with
  1029.                           a letter [A-Z] which may be followed by letters, digits [0-9] or
  1030.                           the underscore  [_].  May be of any length but only the first 32
  1031.                           characters are used.
  1032.  
  1033.                                 arr  The name of an array variable to  declare.  The same
  1034.                           naming conventions as var are used.
  1035.                                 s    The size  (0-based) of an  array variable dimension.
  1036.                           Any constant integer expression is allowed.
  1037.  
  1038.                        Remarks
  1039.                       BOOLEAN variables can hold two values:  1 or  0 (TRUE or FALSE).
  1040.                           It is stored internally as  a one byte unsigned character.  If a
  1041.                           BOOLEAN  is assigned to or from an INTEGER type then the value 1
  1042.                           or 0  is assigned.   If a BOOLEAN  is assigned to  a STRING type
  1043.                           then it is  automatically converted to  a string (either "1"  or
  1044.                           "0").   If a STRING is assigned  to a BOOLEAN then  the value of
  1045.                           the string will be used; a 0 value  will be taken as is, another
  1046.                           other  value will  be converted  to 1.    All other  types, when
  1047.                           assigned to or from  a BOOLEAN, will be converted  to an INTEGER
  1048.                           first before being assigned to or from the BOOLEAN type.
  1049.  
  1050.                        Examples
  1051.  
  1052.                         BOOLEAN flag, bit, isPrime(100), leapYears(2079-
  1053.                         1900)
  1054.  
  1055.                    See Also
  1056.                       DATE Type, INTEGER Type, MONEY Type, STRING Type, TIME Type
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.                           
  1065.  
  1066.  
  1067.  
  1068.                   BROADCAST   Statement
  1069.  
  1070.                    Function
  1071.                       Broadcast a single line message to a range of nodes.
  1072.  
  1073.                        Syntax
  1074.                       BROADCAST lonode,hinode,message
  1075.                                 lonode    An integer expression containing  the low node
  1076.                           number to which the message should be broadcast.
  1077.  
  1078.                                 hinode    An integer expression containing the high node
  1079.                           number to which the message should be broadcast.
  1080.                                 message   A  string expression  containing  the  message
  1081.                           text which should be broadcast to the specified nodes.
  1082.  
  1083.                        Remarks
  1084.                       This  PPL statement functions the same  as the PCBoard BROADCAST
  1085.                           command, which  is normally  reserved for SysOp  security level.
  1086.                           This statement allows you to programatically broadcast a message
  1087.                           to a range of nodes without giving users the ability to manually
  1088.                           broadcast at any time they choose.
  1089.  
  1090.                        Examples
  1091.  
  1092.                         ' Broadcast a message to a specific node
  1093.                         BROADCAST 5,5,"This broadcast from
  1094.                         "+STRING(PCBNODE())
  1095.                         ' Broadcast to a range of nodes
  1096.                         BROADCAST 4,8,"Stand-by for log off in 10 seconds"
  1097.                         ' Broadcast to all nodes
  1098.                         BROADCAST 1,65535,"Hello all!"
  1099.  
  1100.                    See Also
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.                           
  1109.  
  1110.  
  1111.  
  1112.                   BYE   Statement
  1113.  
  1114.                    Function
  1115.                       Log the user off as though they had typed the BYE command.
  1116.  
  1117.                        Syntax
  1118.                       BYE
  1119.                                 No arguments are required
  1120.  
  1121.                        Remarks
  1122.  
  1123.                       There are  multiple ways for  the user  to log off.   One  is by
  1124.                           typing G  at the  command prompt.  That  will warn them  if they
  1125.                           have files flagged for  download and (optionally) confirm  their
  1126.                           selection (incase they accidentally  hit G and ENTER).   Another
  1127.                           is the BYE command.  PCBoard assumes that, if the user typed BYE
  1128.                           instead of G, that they  really want to log off, didn't  type it
  1129.                           in accidentally, and want to leave now.  The BYE statement  does
  1130.                           just that.   It is  intended to provide  you PPL  with the  same
  1131.                           functionality  as many  PCBoard prompts  where G  or BYE  can be
  1132.                           entered at any point.
  1133.                        Examples
  1134.  
  1135.                         STRING s
  1136.                         INPUT "What do you want to do",s
  1137.                         IF     (s = "G")   THEN GOODBYE
  1138.                         ELSEIF (s = "BYE") THEN BYE
  1139.                         ELSE                    KBDSTUFF s
  1140.                         ENDIF
  1141.  
  1142.                    See Also
  1143.                       GOODBYE Statement, HANGUP Statement
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.                           
  1152.  
  1153.  
  1154.  
  1155.                   CALL   Statement
  1156.  
  1157.                    Function
  1158.                       Call  (execute) another  PPE file  from the  currently executing
  1159.                           PPE.
  1160.  
  1161.                        Syntax
  1162.                       CALL filename
  1163.                                 filename  A string  expression containing  the  complete
  1164.                           path and filename of a PPE file to load and execute.
  1165.  
  1166.                        Remarks
  1167.  
  1168.                       It is  sometimes convienient to  load and run  complete programs
  1169.                           from other programs, similar to how you process subroutines with
  1170.                           GOSUB  and RETURN.   PPL supports running both  external EXE and
  1171.                           COM files  via the SHELL statement  and other PPE files  via the
  1172.                           CALL statement.   CALL allows  you to load  and run  another PPE
  1173.                           file,  after which  control  returns to  the  first PPE  at  the
  1174.                           statement after the CALL.  The second PPE is completely separate
  1175.                           from the  first.  You may pass values to the PPE by tokenizing a
  1176.                           string with the TOKENIZE statement.  If you  need to pass values
  1177.                           back  to the first  PPE, you  will need  to create some  sort of
  1178.                           parameter  passing convention  yourself.   For example,  you may
  1179.                           have   the  second  PPE  create  a  file  that  has  the  needed
  1180.                           information for the first PPE.
  1181.                        Examples
  1182.  
  1183.                         STRING s
  1184.                         INPUT "What PPE file do you wish to run",s
  1185.                         CALL "C:\PCB\PPE\"+s+".PPE"
  1186.  
  1187.                    See Also
  1188.                       SHELL Statement
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.                           
  1197.  
  1198.  
  1199.  
  1200.                   CALLID()   Function
  1201.  
  1202.                    Function
  1203.                       Access caller ID information returned from caller ID  compatible
  1204.                           modems.
  1205.  
  1206.                        Syntax
  1207.                       CALLID()
  1208.                                 No arguments are required
  1209.  
  1210.                        Return Type & Value
  1211.  
  1212.                       STRING      Returns a string with caller ID information captured
  1213.                           from a caller ID compatible modem.
  1214.                        Remarks
  1215.  
  1216.                       Some areas of  the country  have an  optional service  available
  1217.                           which  will send, to your modem  (other other telephone device),
  1218.                           the  phone number and/or name  of the person calling  you.  This
  1219.                           service is known  as 'Caller ID'.   Some modems are starting  to
  1220.                           support it directly by  capturing the information and sending it
  1221.                           to  you between  the first  and second  rings.   It can  be very
  1222.                           helpful in determining  who is calling (or abusing) your  BBS or
  1223.                           for  statistical  purposes.    This  function  will  return  the
  1224.                           information if your modem supports it.
  1225.                        Examples
  1226.  
  1227.                         FAPPEND 1,"CID.LOG",O_WR,S_DW
  1228.                         FPUTLN 1,LEFT(U_NAME(),30)+CALLID()
  1229.                         FCLOSE 1
  1230.  
  1231.                    See Also
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.                           
  1240.  
  1241.  
  1242.  
  1243.                   CALLNUM()   Function
  1244.  
  1245.                    Function
  1246.                       Returns the current caller number.
  1247.  
  1248.                        Syntax
  1249.                       CALLNUM()
  1250.                                 No arguments are required
  1251.  
  1252.                        Return Type & Value
  1253.  
  1254.                       INTEGER     Returns the caller number of the user online.
  1255.                        Remarks
  1256.  
  1257.                       Everytime a user logs on to the system the system caller  number
  1258.                           is incremented.  This function will return the caller number for
  1259.                           use in your PPL applications.  It is kept in the main conference
  1260.                           MSGS file.  Note that the  number is not incremented until after
  1261.                           the  user has completely logged  on to the system  so you should
  1262.                           generally wait  until LOGGEDON() reports TRUE  before using this
  1263.                           function.
  1264.                        Examples
  1265.  
  1266.                         IF (LOGGEDON() & (CALLNUM() = 1000000)) THEN
  1267.                           PRINTLN "@BEEP@CONGRATULATIONS!!!"
  1268.                           PRINTLN "@BEEP@YOU ARE THE 1,000,000th CALLER!!!"
  1269.                           PRINTLN "Upgrading security . . ."
  1270.                           GETUSER
  1271.                           LET U_SEC = 99
  1272.                           PUTUSER
  1273.                         ENDIF
  1274.  
  1275.                    See Also
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.                           
  1284.  
  1285.  
  1286.  
  1287.                   CARRIER()   Function
  1288.  
  1289.                    Function
  1290.                       Determine what speed the current caller is connected at.
  1291.  
  1292.                        Syntax
  1293.                       CARRIER()
  1294.                                 No arguments are required
  1295.  
  1296.                        Return Type & Value
  1297.  
  1298.                       INTEGER     Returns an  integer with  the connect  speed of  the
  1299.                           current caller.
  1300.                        Remarks
  1301.  
  1302.                       Should the need arise for  you to know what speed the  caller is
  1303.                           connected  to  the  BBS  at,  this  function  will  return  that
  1304.                           information.    You should  note that  this  information is  not
  1305.                           guaranteed accurate.   It is the responsibility of the  modem to
  1306.                           tell PCBoard the actual connect speed, especially in locked port
  1307.                           environments.   For example, if  your serial port  is locked  at
  1308.                           38400  bps, the modem can usually be configured to report either
  1309.                           the actual connect  speed (9600 bps, for example) or  the locked
  1310.                           port rate (38400  bps).  PCBoard has to trust  the modem; if the
  1311.                           modem tells  it 38400, it will  have to live with  that, as will
  1312.                           your PPL applications.
  1313.                        Examples
  1314.  
  1315.                         IF (CARRIER() < 9600) THEN
  1316.                           PRINTLN "Sorry, downloads are not permitted at
  1317.                         speeds below 9600 bps"
  1318.                           END
  1319.                         ENDIF
  1320.  
  1321.                    See Also
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.                           
  1330.  
  1331.  
  1332.  
  1333.                   CCTYPE()   Function
  1334.  
  1335.                    Function
  1336.                       Determine  what the type of a credit card is based on the credit
  1337.                           card number.
  1338.  
  1339.                        Syntax
  1340.                       CCTYPE(ccnum)
  1341.                                 ccnum     A  string  expression  with  the  credit  card
  1342.                           number that is to be checked.
  1343.  
  1344.                        Return Type & Value
  1345.  
  1346.                       STRING      Returns a string with the name of the card.
  1347.                        Remarks
  1348.  
  1349.                       PPL can be  used to perform some simple credit  card validation.
  1350.                           This function returns the  issuer of a credit card  based on the
  1351.                           credit card  number.  For  example, a valid  credit card  number
  1352.                           that starts with a "4" is a Visa card, so the string "VISA" will
  1353.                           be returned.   If a credit card is invalid  (VALCC() = FALSE) or
  1354.                           not  recognized, then "UNKNOWN"  will be returned.   Other valid
  1355.                           credit card with known types will return the appropriate string.
  1356.                           The  following card  types are  recognized by PPL:   "DISCOVER",
  1357.                           "CARTE  BLANCHE", "DINERS  CLUB", "OPTIMA",  "AMERICAN EXPRESS",
  1358.                           "VISA", and "MASTERCARD".
  1359.  
  1360.                        Examples
  1361.  
  1362.                         STRING s
  1363.                         INPUT "Credit card number",s
  1364.                         IF (VALCC(s)) PRINTLN LEFT(CCTYPE(s),20)," -
  1365.                         ",FMTCC(s)
  1366.  
  1367.                    See Also
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.                           
  1376.  
  1377.  
  1378.  
  1379.                   CDCHKOFF   Statement
  1380.  
  1381.                    Function
  1382.                       Turn off carrier detect checking.
  1383.  
  1384.                        Syntax
  1385.                       CDCHKOFF
  1386.                                 No arguments are required
  1387.  
  1388.                        Remarks
  1389.  
  1390.                       PCBoard  has built  in automatic carrier  detecting.   What this
  1391.                           means  is that  if someone  should hangup  unexpectedly, PCBoard
  1392.                           will detect it, log it  to the callers log, and recycle  back to
  1393.                           the call waiting screen.   Some applications require the ability
  1394.                           to turn this off; for example, a callback verification PPE needs
  1395.                           to hangup on the caller and then do more  processing.  Normally,
  1396.                           PCBoard would just  recycle at that point.  So,  just before you
  1397.                           start a section  of code that should continue regardless  of the
  1398.                           existence of  a  caller  online, you  should  issue  a  CDCHKOFF
  1399.                           statement.   It  will turn off  the automatic  carrier checking.
  1400.                           When you've finished the  block where carrier checking has  been
  1401.                           disabled, issue the CDCHKON statement to turn it back on.
  1402.                        Examples
  1403.  
  1404.                         CDCHKOFF
  1405.                         DTROFF
  1406.                         DELAY 18
  1407.                         DTRON
  1408.                         SENDMODEM "ATDT1800DATAFON" ' Please don't call
  1409.                         this number! :)
  1410.                         WAITFOR "CONNECT",60
  1411.                         CDCHKON
  1412.  
  1413.                    See Also
  1414.                       CDCHKON Statement
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.                           
  1423.  
  1424.  
  1425.  
  1426.                   CDCHKON   Statement
  1427.  
  1428.                    Function
  1429.                       Turn on carrier detect checking.
  1430.  
  1431.                        Syntax
  1432.                       CDCHKON
  1433.                                 No arguments are required
  1434.  
  1435.                        Remarks
  1436.  
  1437.                       PCBoard  has built  in automatic carrier  detecting.   What this
  1438.                           means  is that  if someone  should hangup  unexpectedly, PCBoard
  1439.                           will detect it, log it  to the callers log, and recycle  back to
  1440.                           the call waiting screen.   Some applications require the ability
  1441.                           to turn this off; for example, a callback verification PPE needs
  1442.                           to hangup on the caller and then do more  processing.  Normally,
  1443.                           PCBoard would just  recycle at that point.  So,  just before you
  1444.                           start a section  of code that should continue regardless  of the
  1445.                           existence of  a  caller  online, you  should  issue  a  CDCHKOFF
  1446.                           statement.   It  will turn off  the automatic  carrier checking.
  1447.                           When you've finished the  block where carrier checking has  been
  1448.                           disabled, issue the CDCHKON statement to turn it back on.
  1449.                        Examples
  1450.  
  1451.                         CDCHKOFF
  1452.                         DTROFF
  1453.                         DELAY 18
  1454.                         DTRON
  1455.                         SENDMODEM "ATDT1800DATAFON" ' Please don't call
  1456.                         this number! :)
  1457.                         WAITFOR "CONNECT",60
  1458.                         CDCHKON
  1459.  
  1460.                    See Also
  1461.                       CDCHKOFF Statement
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.                           
  1470.  
  1471.  
  1472.  
  1473.                   CDON()   Function
  1474.  
  1475.                    Function
  1476.                       Determine if carrier detect in on or not.
  1477.  
  1478.                        Syntax
  1479.                       CDON()
  1480.                                 No arguments are required
  1481.  
  1482.                        Return Type & Value
  1483.  
  1484.                       BOOLEAN     Returns  a boolean  TRUE  if carrier  detect is  on,
  1485.                           FALSE otherwise.
  1486.                        Remarks
  1487.  
  1488.                       If you have  used CDCHKOFF to turn off automatic  carrier detect
  1489.                           checking PCBoard  will not  automatically detect  and act  on  a
  1490.                           carrier loss.  If necessary, this function can be used to detect
  1491.                           a carrier loss condition and act appropriately.
  1492.                        Examples
  1493.  
  1494.                         IF (!CDON()) THEN
  1495.                           LOG "Carrier lost in PPE "+PPENAME(),FALSE
  1496.                           HANGUP
  1497.                         ENDIF
  1498.  
  1499.                    See Also
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.                           
  1508.  
  1509.  
  1510.  
  1511.                   CHAT   Statement
  1512.  
  1513.                    Function
  1514.                       Enter SysOp chat mode.
  1515.  
  1516.                        Syntax
  1517.                       CHAT
  1518.                                 No arguments are required
  1519.  
  1520.                        Remarks
  1521.  
  1522.                       One of the  features of PCBoard where change is  often requested
  1523.                           is the operator  page facility.  Some people want  to be able to
  1524.                           configure multiple ranges  of availability per day,  some want a
  1525.                           different sounding page bell,  longer or shorter page  attempts,
  1526.                           etc, etc.   This statement,  along with the  PAGEON and  PAGEOFF
  1527.                           statements and the PAGESTAT()  function, allow you to  implement
  1528.                           an  operator page in any way desired.   Of course, the SysOp may
  1529.                           still start a  chat with  the F10 key  or by  responding to  the
  1530.                           default O (operator page) command, and the CHAT statement may be
  1531.                           used  at  anytime  (although  you'll  generally  want  to  avoid
  1532.                           starting  it unless you've confirmed that the SysOp is available
  1533.                           since the user has no way to exit it himself).
  1534.                        Examples
  1535.  
  1536.                         PAGEON
  1537.                         FOR i = 1 TO 10
  1538.                           PRINT "@BEEP@"
  1539.                           DELAY 18
  1540.                           IF (KINKEY() = " ") THEN
  1541.                             CHAT
  1542.                             GOTO exit
  1543.                           ENDIF
  1544.                         NEXT
  1545.                         :exit
  1546.  
  1547.                    See Also
  1548.                       PAGEOFF Statement, PAGEOFF Statement, PAGESTAT() Function
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.                           
  1557.  
  1558.  
  1559.  
  1560.                   CHR()   Function
  1561.  
  1562.                    Function
  1563.                       Converts an ASCII code to a character.
  1564.  
  1565.                        Syntax
  1566.                       CHR(iexp)
  1567.                                 iexp Any integer expression between 0 and 255.
  1568.  
  1569.                        Return Type & Value
  1570.  
  1571.                       STRING      Returns  a one character long string for ASCII codes
  1572.                           from 1 to 255 or an empty string for ASCII code 0.
  1573.                        Remarks
  1574.  
  1575.                       In other languages (such as  BASIC) you can have any of  the 256
  1576.                           possible  ASCII codes  (0-255)  in a  string.   In  PPL  you are
  1577.                           limited  to  255 codes  (1-255)  because  ASCII  0  is  used  to
  1578.                           terminate  strings and can't  appear in the middle  of a string.
  1579.                           So, if  you ever get an  empty string from this  function, it is
  1580.                           because you passed it a 0.  Any other value will return a  valid
  1581.                           string with a single character.
  1582.                        Examples
  1583.  
  1584.                         PRINTLN "The ASCII code for S is ",ASC("S")
  1585.                         ' Convert a lowercase s to uppercase
  1586.                         STRING s
  1587.                         LET s = CHR(ASC("s")-ASC("a")+ASC("A"))
  1588.  
  1589.                    See Also
  1590.                       ASC() Function
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.                           
  1599.  
  1600.  
  1601.  
  1602.                   CLOSECAP   Statement
  1603.  
  1604.                    Function
  1605.                       Close the screen capture file.
  1606.  
  1607.                        Syntax
  1608.                       CLOSECAP
  1609.                                 No arguments are required
  1610.  
  1611.                        Remarks
  1612.  
  1613.                       PCBoard has  the ability to capture screen output  to a file for
  1614.                           later reference.   PPL allows that same ability via  the OPENCAP
  1615.                           and CLOSECAP statements.  This could be useful in a program that
  1616.                           executes a  series of commands  in non-stop mode.   The  process
  1617.                           could open a capture file first, execute the commands, close the
  1618.                           capture  file, then  allow  the user  to  view or  download  the
  1619.                           capture  file.  CLOSECAP  closes the capture file  and turns off
  1620.                           screen capturing.   Also, the SHOWON and  SHOWOFF statements can
  1621.                           be used  to turn  on and off  showing information to  the screen
  1622.                           while allowing  that same information (even if  not displayed or
  1623.                           transmitted via modem) to be captured to a file.  The SHOWSTAT()
  1624.                           function can  be used to check the current  status of the SHOWON
  1625.                           and SHOWOFF statements.
  1626.                        Examples
  1627.  
  1628.                         BOOLEAN ss
  1629.                         LET ss = SHOWSTAT()
  1630.                         SHOWOFF
  1631.                         OPENCAP "CAP"+STRING(PCBNODE()),ocFlag
  1632.                         IF (ocFlag) THEN
  1633.                           DIR "U;NS"
  1634.                           CLOSECAP
  1635.                           KBDSTUFF "FLAG CAP"+STRING(PCBNODE())+CHR(13)
  1636.                         ENDIF
  1637.                         IF (ss) THEN
  1638.                           SHOWON
  1639.                         ELSE
  1640.                           SHOWOFF
  1641.                         ENDIF
  1642.  
  1643.                    See Also
  1644.                       OPENCAP  Statement,   SHOWOFF   Statement,   SHOWON   Statement,
  1645.                           SHOWSTAT() Function
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.                           
  1654.  
  1655.  
  1656.  
  1657.                   CLREOL   Statement
  1658.  
  1659.                    Function
  1660.                       Clear the  current line from the  cursor to the end  of the line
  1661.                           using the current color.
  1662.  
  1663.                        Syntax
  1664.                       CLREOL
  1665.                                 No arguments are required
  1666.  
  1667.                        Remarks
  1668.  
  1669.                       This statement will work  one of two ways depending on  the mode
  1670.                           the caller is  in.  If the  caller is in graphics  mode (or non-
  1671.                           graphics  ANSI-positioning) then  PCBoard  will  issue the  ANSI
  1672.                           sequence  to clear  to the  end of  the line  using  the current
  1673.                           color.   ANSI emulators,  when written properly,  will echo  the
  1674.                           color all the  way to column  80 of  the current line when  they
  1675.                           receive this ANSI sequence.  If the user is in non-graphics non-
  1676.                           ANSI mode, PCBoard will write  sufficient spaces to the  display
  1677.                           to  move  to column  80  and  then  backspace  to  the  original
  1678.                           position.   Note that this  will not clear the  80th column; the
  1679.                           reason for  this is  to always keep  the cursor  on the  current
  1680.                           line.  If the cursor wrote a space to column 80 and moved to the
  1681.                           beginning of the  next line it wouldn't be able  to move back up
  1682.                           to  the previous  line without  ANSI (which  we already  know we
  1683.                           don't have).  This should be adequate for most applications.
  1684.                        Examples
  1685.  
  1686.                         COLOR @X47
  1687.                         CLS
  1688.                         PRINT "This is some sample text.  (This will
  1689.                         disappear.)"
  1690.                         WHILE (INKEY() = "") DELAY 1
  1691.                         BACKUP 22
  1692.                         COLOR @X1F
  1693.                         CLREOL
  1694.                         PRINT "This goes to the end of the line."
  1695.  
  1696.                    See Also
  1697.                       CLS Statement
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.                           
  1706.  
  1707.  
  1708.  
  1709.                   CLS   Statement
  1710.  
  1711.                    Function
  1712.                       Clear the screen using the current color.
  1713.  
  1714.                        Syntax
  1715.                       CLS
  1716.                                 No arguments are required
  1717.  
  1718.                        Remarks
  1719.  
  1720.                       This statement  will work one of two ways  depending on the mode
  1721.                           the caller  is in.  If  the caller is in graphics  mode (or non-
  1722.                           graphics ANSI-positioning)  then  PCBoard will  issue  the  ANSI
  1723.                           sequence to clear to the screen using the current color.  If the
  1724.                           user  is in non-graphics non-ANSI mode,  PCBoard will write send
  1725.                           an ASCII  12 (form feed) character  to the remote terminal  in a
  1726.                           last  ditch effort  to clear  the remote  callers screen.   Many
  1727.                           terminal programs do support this, but not all, so be aware that
  1728.                           callers may see the ASCII 12 instead of a clear screen.
  1729.                        Examples
  1730.  
  1731.                         COLOR @X47
  1732.                         CLS
  1733.                         PRINT "This is some sample text.  (This will
  1734.                         disappear.)"
  1735.                         WHILE (INKEY() = "") DELAY 1
  1736.                         BACKUP 22
  1737.                         COLOR @X1F
  1738.                         CLREOL
  1739.                         PRINT "This goes to the end of the line."
  1740.  
  1741.                    See Also
  1742.                       CLREOL Statement
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.                           
  1751.  
  1752.  
  1753.  
  1754.                   COLOR   Statement
  1755.  
  1756.                    Function
  1757.                       Change the current active color.
  1758.  
  1759.                        Syntax
  1760.                       COLOR newcolor
  1761.                                 newcolor  An integer expression containing the new color
  1762.                           to be used by PCBoard and the remote terminal software.
  1763.  
  1764.                        Remarks
  1765.  
  1766.                       This  statement will change the color in use by PCBoard and send
  1767.                           the  appropriate ANSI  sequence to  change color  to  the remote
  1768.                           terminal  software.  Note that this statement will only affect a
  1769.                           color change if the user is in graphics mode.  If the user is in
  1770.                           non-graphics mode this statement will be ignored.
  1771.                        Examples
  1772.  
  1773.                         COLOR @X47
  1774.                         CLS
  1775.                         PRINT "This is some sample text.  (This will
  1776.                         disappear.)"
  1777.                         WHILE (INKEY() = "") DELAY 1
  1778.                         BACKUP 22
  1779.                         COLOR @X1F
  1780.                         CLREOL
  1781.                         PRINT "This goes to the end of the line."
  1782.  
  1783.                    See Also
  1784.                       DEFCOLOR Statement, DEFCOLOR() Function
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.                           
  1793.  
  1794.  
  1795.  
  1796.                   CONFFLAG   Statement
  1797.  
  1798.                    Function
  1799.                       Set  specified flags in  the current conference  for the current
  1800.                           user.
  1801.  
  1802.                        Syntax
  1803.                       CONFFLAG confnum,flags
  1804.                                 confnum   An    integer   expression    containing   the
  1805.                           conference number to affect.
  1806.  
  1807.                                 flags     An integer expression  containing the flags to
  1808.                           set.
  1809.  
  1810.                        Remarks
  1811.                       Each user on the BBS has a set of five flags for each conference
  1812.                           that control various  settings.  These  flags control the  users
  1813.                           registration  in  a  conference,  their   expired  status  in  a
  1814.                           conference, whether  or not  they  have a  conference  selected,
  1815.                           whether or  not  they have  mail  waiting in  a conference,  and
  1816.                           whether or not they have SysOp priviledges in a conference.  Any
  1817.                           or all of  these flags may  be set at  once.  To  assist you  in
  1818.                           using this statement, five predefined constants are available to
  1819.                           specify each flag:   F_REG, F_EXP, F_SEL,  F_MW, and F_SYS.   To
  1820.                           use these constants simply add the ones you need together.
  1821.                        Examples
  1822.  
  1823.                         ' Automatically register them in selected
  1824.                         conferences
  1825.                         INTEGER i
  1826.                         FOR i = 1 TO 10
  1827.                           CONFFLAG i,F_REG+F_EXP+F_SEL
  1828.                         NEXT
  1829.                         FOR i = 11 TO 20
  1830.                           CONFFLAG i,F_REG+F_SEL
  1831.                         NEXT
  1832.  
  1833.                    See Also
  1834.  
  1835.                       CONFUNFLAG  Statement,  F_EXP  Constant,  F_MW  Constant,  F_REG
  1836.                           Constant, F_SEL Constant, F_SYS Constant
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.                           
  1845.  
  1846.  
  1847.  
  1848.                   CONFUNFLAG   Statement
  1849.  
  1850.                    Function
  1851.                       Clear specified flags in the current conference for the  current
  1852.                           user.
  1853.  
  1854.                        Syntax
  1855.                       CONFUNFLAG confnum,flags
  1856.                                 confnum   An    integer   expression    containing   the
  1857.                           conference number to affect.
  1858.  
  1859.                                 flags     An integer expression  containing the flags to
  1860.                           clear.
  1861.  
  1862.                        Remarks
  1863.                       Each user on the BBS has a set of five flags for each conference
  1864.                           that control various  settings.  These  flags control the  users
  1865.                           registration  in  a  conference,  their   expired  status  in  a
  1866.                           conference, whether  or not  they  have a  conference  selected,
  1867.                           whether or  not  they have  mail  waiting in  a conference,  and
  1868.                           whether or not they have SysOp priviledges in a conference.  Any
  1869.                           or all of these flags may be cleared at once.  To assist  you in
  1870.                           using this statement, five predefined constants are available to
  1871.                           specify each flag:   F_REG, F_EXP, F_SEL,  F_MW, and F_SYS.   To
  1872.                           use these constants simply add the ones you need together.
  1873.                        Examples
  1874.  
  1875.                         ' Automatically deregister them from selected
  1876.                         conferences
  1877.                         INTEGER i
  1878.                         FOR i = 1 TO 10
  1879.                           CONFUNFLAG i,F_REG+F_EXP+F_SEL
  1880.                         NEXT
  1881.                         FOR i = 11 TO 20
  1882.                           CONFUNFLAG i,F_REG+F_SEL
  1883.                         NEXT
  1884.  
  1885.                    See Also
  1886.  
  1887.                       CONFFLAG  Statement,   F_EXP  Constant,  F_MW   Constant,  F_REG
  1888.                           Constant, F_SEL Constant, F_SYS Constant
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.                           
  1897.  
  1898.  
  1899.  
  1900.                   CURCOLOR()   Function
  1901.  
  1902.                    Function
  1903.                       Returns the color in use by the ANSI driver.
  1904.  
  1905.                        Syntax
  1906.                       CURCOLOR()
  1907.                                 No arguments are required
  1908.  
  1909.                        Return Type & Value
  1910.  
  1911.                       INTEGER     Returns the color  code most recently issued  to the
  1912.                           ANSI driver.
  1913.                        Remarks
  1914.  
  1915.                       The @X code processor within PCBoard has the ability to save and
  1916.                           restore color  codes built  in.   PCBoard accomplishes  this  by
  1917.                           saving  the  current color  whenever it  encounters an  @X00 and
  1918.                           reissuing  the   color  change  when  it   encounters  an  @XFF.
  1919.                           Unfortunately,  PCBoard will only remember  one color at a time.
  1920.                           With this  function you can  save and restore as  many colors as
  1921.                           your application needs.
  1922.                        Examples
  1923.  
  1924.                         INTEGER cc,x,y
  1925.                         COLOR @X0F
  1926.                         ANSIPOS 26,23
  1927.                         PRINT "Hit the SPACE BAR to continue"
  1928.                         WHILE (KINKEY() <> " ") DO
  1929.                           CLS
  1930.                           LET x = 1+RANDOM(57)
  1931.                           LET y = 1+RANDOM(21)
  1932.                           PUSH 1+RANDOM(14)
  1933.                           GOSUB sub
  1934.                           LET cc = CURCOLOR()
  1935.                           PUSH @X0F
  1936.                           GOSUB sub
  1937.                           PUSH cc
  1938.                           GOSUB sub
  1939.                           ANSIPOS 1,y
  1940.                           CLREOL
  1941.                         ENDWHILE
  1942.  
  1943.                         :sub
  1944.                         INTEGER c
  1945.                         POP c
  1946.                         COLOR c
  1947.                         ANSIPOS x,y
  1948.                         PRINT "PCBoard 15.0 with PPL!"
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.                       
  1957.  
  1958.                         DELAY 18
  1959.                         RETURN
  1960.  
  1961.                    See Also
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.                           
  1970.  
  1971.  
  1972.  
  1973.                   CURCONF()   Function
  1974.  
  1975.                    Function
  1976.                       Get the current conference number.
  1977.  
  1978.                        Syntax
  1979.                       CURCONF()
  1980.                                 No arguments are required
  1981.  
  1982.                        Return Type & Value
  1983.  
  1984.                       INTEGER     Returns  an  integer  with  the  current  conference
  1985.                           number.
  1986.                        Remarks
  1987.  
  1988.                       This function can be useful in configuring a PPL program to work
  1989.                           in different ways in different conferences.  As a quick example,
  1990.                           we have  a PPE file on  Salt Air that interfaces  with the enter
  1991.                           message command.  If a user is in  certain conferences we prompt
  1992.                           them  for additional  information  that  we  will  likely  need,
  1993.                           otherwise  we  skip to  the  normal enter  message process.   Of
  1994.                           course, that's just one example; you are sure to have other uses
  1995.                           for it.
  1996.                        Examples
  1997.  
  1998.                         IF (CURCONF() = 6) THEN ' The Salt Air beta
  1999.                         conference is 6
  2000.                           PRINTLN "You are leaving a message in the beta
  2001.                         conference."
  2002.                           PRINTLN "Be sure to leave your file date and
  2003.                         time"
  2004.                           PRINTLN "and a complete description of the
  2005.                         problem."
  2006.                         ENDIF
  2007.                         KBDSTUFF TOKENSTR()
  2008.  
  2009.                    See Also
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.                           
  2018.  
  2019.  
  2020.  
  2021.                   CURSEC()   Function
  2022.  
  2023.                    Function
  2024.                       Get the users current security level.
  2025.  
  2026.                        Syntax
  2027.                       CURSEC()
  2028.                                 No arguments are required
  2029.  
  2030.                        Return Type & Value
  2031.  
  2032.                       INTEGER     Returns an integer  with the current  security level
  2033.                           of the user.
  2034.                        Remarks
  2035.  
  2036.                       Although the  users primary security  level may be  accessed via
  2037.                           the U_SEC  variable after  using the  GETUSER statement,  it  is
  2038.                           often necessary to know the users security level right now after
  2039.                           taking into  account whether  or not they  have expired  access,
  2040.                           additional  security  from  joining  a specific  conference,  or
  2041.                           additional security from the  keyboard.  This function will take
  2042.                           all variables  into  account and  return the  current  'logical'
  2043.                           security level.
  2044.                        Examples
  2045.  
  2046.                         IF (CURSEC() < 100) PRINTLN "Insufficient
  2047.                         security!"
  2048.  
  2049.                    See Also
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.                           
  2058.  
  2059.  
  2060.  
  2061.                   DATE   Type
  2062.  
  2063.                    Function
  2064.                       Declare one or more variables of type date.
  2065.  
  2066.                        Syntax
  2067.                       DATE var|arr(s[,s[,s]])[,var|arr(s[,s[,s]])]
  2068.                                 var  The name of a variable to  declare.  Must start with
  2069.                           a letter [A-Z] which may be followed by letters, digits [0-9] or
  2070.                           the underscore  [_].  May be of any length but only the first 32
  2071.                           characters are used.
  2072.  
  2073.                                 arr  The name of an array variable to  declare.  The same
  2074.                           naming conventions as var are used.
  2075.                                 s    The size  (0-based) of an  array variable dimension.
  2076.                           Any constant integer expression is allowed.
  2077.  
  2078.                        Remarks
  2079.                       DATE variables are stored as julian dates.  Valid dates are 0 (a
  2080.                           special case to represent  an invalid date)  and 1 (1 JAN  1900)
  2081.                           through 36524 (31 DEC 1999)  through 65535 (5 JUN 2079).   It is
  2082.                           stored internally as a two byte unsigned integer.   If a DATE is
  2083.                           assigned to or  from an INTEGER  type then  the julian date  (0-
  2084.                           65535) is assigned.  If a DATE is assigned to a STRING type then
  2085.                           it  is   automatically  converted   to  the   following  format:
  2086.                           "MM/DD/YY", where MM  is the two digit month  (01-12), DD is the
  2087.                           two digit day of the month (01-31), and YY is the two digit year
  2088.                           (00-99).  If a foreign language is in use  that uses a different
  2089.                           date format  (for example,  "DD/MM/YY" or "YY.MM.DD")  then that
  2090.                           will be taken into account.   If a STRING is assigned to  a DATE
  2091.                           then PPL  will do it's best  to convert the  string back to  the
  2092.                           appropriate julian date.  However, dates before 1980 will not be
  2093.                           handled  correctly because  only  a two  digit  year is  used in
  2094.                           strings.  All other types, when assigned to or from a DATE, will
  2095.                           be converted  to an  INTEGER first before  being assigned to  or
  2096.                           from the DATE type.
  2097.  
  2098.                        Examples
  2099.  
  2100.                         DATE dob, today, range(2), leapYears(50)
  2101.  
  2102.                    See Also
  2103.                       BOOLEAN Type, INTEGER Type, MONEY Type, STRING Type, TIME Type
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.                           
  2112.  
  2113.  
  2114.  
  2115.                   DATE()   Function
  2116.  
  2117.                    Function
  2118.                       Get today's date.
  2119.  
  2120.                        Syntax
  2121.                       DATE()
  2122.                                 No arguments are required
  2123.  
  2124.                        Return Type & Value
  2125.  
  2126.                       DATE  Returns a date for today.
  2127.                        Remarks
  2128.  
  2129.                       The date returned is  represented internally in a julian  format
  2130.                           (the number of days  since January 1, 1900).  It may  be used as
  2131.                           is (for display,  storage or as an argument to  another function
  2132.                           or statement) or assigned to an integer for arithmetic purposes.
  2133.                        Examples
  2134.  
  2135.                         PRINTLN "Today is ",DATE()
  2136.  
  2137.                    See Also
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.                           
  2146.  
  2147.  
  2148.  
  2149.                   DAY()   Function
  2150.  
  2151.                    Function
  2152.                       Extracts the day of the month from a date.
  2153.  
  2154.                        Syntax
  2155.                       DAY(dexp)
  2156.                                 dexp Any date expression.
  2157.  
  2158.                        Return Type & Value
  2159.  
  2160.                       INTEGER     Returns the day of the month from the specified date
  2161.                           expression (dexp).  Valid return values are from 1 to 31.
  2162.                        Remarks
  2163.  
  2164.                       This  function  allows you  to  extract  a  particular piece  of
  2165.                           information about  a DATE  value, in  this case  the day  of the
  2166.                           month of the date.
  2167.                        Examples
  2168.  
  2169.                         PRINTLN "Today is:  ",DAY(DATE())
  2170.  
  2171.                    See Also
  2172.                       DOW() Function, MONTH() Function, YEAR() Function
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.                           
  2181.  
  2182.  
  2183.  
  2184.                   DBGLEVEL   Statement
  2185.  
  2186.                    Function
  2187.                       Set a new debug level for PCBoard.
  2188.  
  2189.                        Syntax
  2190.                       DBGLEVEL level
  2191.                                 level     An  integer  expression  with  the  new  debug
  2192.                           level.
  2193.  
  2194.                        Remarks
  2195.  
  2196.                       PCBoard  supports  an   internal  variable  that  allows   debug
  2197.                           information to be written to the callers log.  Level 0 specified
  2198.                           no debug  information.   Levels 1  through 3  specify  different
  2199.                           (increasing) levels of debug information.  It can also be useful
  2200.                           for debugging your  PPL programs.  This statement allows  you to
  2201.                           change  the PCBoard debug  level on the fly  without the need to
  2202.                           have the SysOp exit and change it in the BOARD.BAT file.
  2203.                        Examples
  2204.  
  2205.                         INTEGER newlvl
  2206.                         INPUT "New level",newlvl
  2207.                         NEWLINE
  2208.                         DBGLEVEL newlvl
  2209.  
  2210.                    See Also
  2211.                       DBGLEVEL() Function, LOG Statement
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.                           
  2220.  
  2221.  
  2222.  
  2223.                   DBGLEVEL()   Function
  2224.  
  2225.                    Function
  2226.                       Returns the debug level in effect.
  2227.  
  2228.                        Syntax
  2229.                       DBGLEVEL()
  2230.                                 No arguments are required
  2231.  
  2232.                        Return Type & Value
  2233.  
  2234.                       INTEGER     Returns the current debug level.
  2235.                        Remarks
  2236.  
  2237.                       PCBoard  supports   an  internal  variable   that  allows  debug
  2238.                           information to be written to the callers log.  Level 0 specified
  2239.                           no debug  information.   Levels 1  through 3  specify  different
  2240.                           (increasing) levels of debug information.  It can also be useful
  2241.                           for  debugging your PPL  programs.  Using this  function you can
  2242.                           tie  your debug information  to a specified debug  level of your
  2243.                           choosing.
  2244.                        Examples
  2245.  
  2246.                         IF (DBGLEVEL() = 1) LOG "Writing DEBUG info for
  2247.                         "+PPENAME(),0
  2248.  
  2249.                    See Also
  2250.                       DBGLEVEL Statement, LOG Statement
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.                           
  2259.  
  2260.  
  2261.  
  2262.                   DEC   Statement
  2263.  
  2264.                    Function
  2265.                       Decrement the value of a variable.
  2266.  
  2267.                        Syntax
  2268.                       DEC var
  2269.                                 var  The variable with the value to decrement.
  2270.  
  2271.                        Remarks
  2272.  
  2273.                       Many programs require  extensive addition  and subtraction,  and
  2274.                           most often,  a  value is  increased  or decreased  by 1.    This
  2275.                           statement  allows  for  a  shorter,  more  efficient  method  of
  2276.                           decreasing (decrementing) a value by 1 than subtracting 1 from a
  2277.                           variable and assigning the result to the same variable.
  2278.                        Examples
  2279.  
  2280.                         INTEGER i
  2281.                         PRINTLN "Countdown:"
  2282.                         LET i = 10
  2283.                         WHILE (i >= 0) DO
  2284.                           PRINTLN "T minus ",i
  2285.                           DEC i
  2286.                         ENDWHILE
  2287.  
  2288.                    See Also
  2289.                       INC Statement
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.                           
  2298.  
  2299.  
  2300.  
  2301.                   DEFCOLOR   Statement
  2302.  
  2303.                    Function
  2304.                       Change the current color to the system default color.
  2305.  
  2306.                        Syntax
  2307.                       DEFCOLOR
  2308.                                 No arguments are required
  2309.  
  2310.                        Remarks
  2311.  
  2312.                       This statement will  change the color in  use by PCBoard to  the
  2313.                           system  default and send the appropriate ANSI sequence to change
  2314.                           color  to  the remote  terminal  software.    This statement  is
  2315.                           equivalent to COLOR DEFCOLOR().   Note that this  statement will
  2316.                           only affect a  color change if the user is in graphics mode.  If
  2317.                           the user is in non-graphics mode this statement will be ignored.
  2318.                        Examples
  2319.  
  2320.                         COLOR @X47
  2321.                         CLS
  2322.                         PRINT "This is some sample text.  (This will
  2323.                         disappear.)"
  2324.                         WHILE (INKEY() = "") DELAY 1
  2325.                         BACKUP 22
  2326.                         DEFCOLOR
  2327.                         CLREOL
  2328.                         PRINT "This goes to the end of the line."
  2329.  
  2330.                    See Also
  2331.                       COLOR Statement, DEFCOLOR() Function
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.                           
  2340.  
  2341.  
  2342.  
  2343.                   DEFCOLOR()   Function
  2344.  
  2345.                    Function
  2346.                       Return the system default color.
  2347.  
  2348.                        Syntax
  2349.                       DEFCOLOR()
  2350.                                 No arguments are required
  2351.  
  2352.                        Return Type & Value
  2353.  
  2354.                       INTEGER     Returns  the  system  default  color  as defined  in
  2355.                           PCBSetup.
  2356.                        Remarks
  2357.  
  2358.                       This  function is useful in cases where you must pass a color to
  2359.                           a statement but you want  to honor the SysOp's choice of default
  2360.                           color for the system.   In that case you cannot use the DEFCOLOR
  2361.                           statement because it does not return  a value that you can  pass
  2362.                           to another statement.
  2363.                        Examples
  2364.  
  2365.                         STRING yn
  2366.                         DEFCOLOR
  2367.                         CLS
  2368.                         LET yn = YESCHAR()
  2369.                         INPUTYN "Continue",yn,DEFCOLOR()
  2370.                         IF (yn = NOCHAR()) END
  2371.  
  2372.                    See Also
  2373.                       COLOR Statement, DEFCOLOR Statement
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.                           
  2382.  
  2383.  
  2384.  
  2385.                   DEFS   Constant
  2386.  
  2387.                    Function
  2388.                       Used  when no special  statement parameters or  flags are needed
  2389.                           and defaults are sufficient.
  2390.  
  2391.                        Value
  2392.                       0 = 0b = 0o = 0h
  2393.  
  2394.                        Remarks
  2395.                       There are many statements that take special values as parameters
  2396.                           or flags as an indication to  do some special processing.   This
  2397.                           constant  is meant to be used by itself when you do not need any
  2398.                           other special constant value.
  2399.  
  2400.                        Examples
  2401.  
  2402.                         STRING ans
  2403.                         LET ans = NOCHAR()
  2404.                         INPUTSTR "Run program now",ans,@X0E,1,"YyNn",DEFS
  2405.                         IF (UPPER(ans) = NOCHAR()) END
  2406.  
  2407.                    See Also
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.                           
  2416.  
  2417.  
  2418.  
  2419.                   DELAY   Statement
  2420.  
  2421.                    Function
  2422.                       Pause execution for a specified period of clock ticks.
  2423.  
  2424.                        Syntax
  2425.                       DELAY ticks
  2426.                                 ticks     An integer expression with the number of clock
  2427.                           ticks to pause.
  2428.  
  2429.                        Remarks
  2430.  
  2431.                       It is often desireable  to wait for a precise time  interval for
  2432.                           various  purposes.  This  function will allow you  to specify an
  2433.                           interval  to  delay   in  clock  ticks.    One  clock   tick  is
  2434.                           approximately 1/18.2 of a second.  So to delay for approximately
  2435.                           one second, you should use  DELAY 18.  The basic formula  to use
  2436.                           is (seconds  to delay*18.2) and  then round off  to the  nearest
  2437.                           whole number.   Note however  that PPL doesn't  support floating
  2438.                           point arithmetic, so if you want to calculate the delay interval
  2439.                           at  run   time  you  should  use  something   like  (seconds  to
  2440.                           delay*182)/10.
  2441.                        Examples
  2442.  
  2443.                         INTEGER i
  2444.                         PRINTLN "Countdown:"
  2445.                         LET i = 10
  2446.                         WHILE (i >= 0) DO
  2447.                           PRINTLN "T minus ",i
  2448.                           DEC i
  2449.                           DELAY 18
  2450.                         ENDWHILE
  2451.  
  2452.                    See Also
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.                           
  2461.  
  2462.  
  2463.  
  2464.                   DELETE   Statement
  2465.  
  2466.                    Function
  2467.                       Delete a specified file from the disk it resides on.
  2468.  
  2469.                        Syntax
  2470.                       DELETE file
  2471.                                 file A string  expression with the  drive, path  and file
  2472.                           name to delete.
  2473.  
  2474.                        Remarks
  2475.  
  2476.                       It is always a  good idea to leave things as you  found them (as
  2477.                           much  as  possible).    This  statement  allows  you  to  delete
  2478.                           temporary    files    created    by    your   PPE    with    the
  2479.                           FCREATE/FOPEN/FAPPEND statements.
  2480.                        Examples
  2481.  
  2482.                         INTEGER retcode
  2483.                         STRING  s
  2484.                         FCREATE 1,"TMP.LST",O_WR,S_DB
  2485.                         LET s = "START"
  2486.                         WHILE (LEN(s) > 0) DO
  2487.                           LET s = ""
  2488.                           PRINTLN "Enter a name or ENTER alone to quit:"
  2489.                           INPUT "Name",s
  2490.                           IF (LEN(s) > 0) FPUTLN 1,s
  2491.                         ENDWHILE
  2492.                         FCLOSE 1
  2493.                         SHELL 1,retcode,"SORT","< TMP.LST > TMP.SRT"
  2494.                         NEWLINE
  2495.                         PRINTLN "Unsorted List:"
  2496.                         PRINTLN "--------------"
  2497.                         DISPFILE "TMP.LST",DEFS
  2498.                         NEWLINE
  2499.                         PRINTLN "Sorted List:"
  2500.                         PRINTLN "--------------"
  2501.                         DISPFILE "TMP.SRT",DEFS
  2502.                         DELETE "TMP.LST"
  2503.                         DELETE "TMP.SRT"
  2504.  
  2505.                    See Also
  2506.                       RENAME Statement
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.                           
  2515.  
  2516.  
  2517.  
  2518.                   DELUSER   Statement
  2519.  
  2520.                    Function
  2521.                       Flag the user online on the current node for deletion.
  2522.  
  2523.                        Syntax
  2524.                       DELUSER
  2525.                                 No arguments are required
  2526.  
  2527.                        Remarks
  2528.  
  2529.                       This statement  will set the  delete user record  flag to  TRUE.
  2530.                           This will  merely flag  PCBSystemManager  to pack  out the  user
  2531.                           during the next pack  operation.  If you  want to make sure  the
  2532.                           user doesn't log  back in before being packed out,  use GETUSER,
  2533.                           set his U_SEC and U_EXPSEC  variables to 0, and use  the PUTUSER
  2534.                           statement to write the changes to the user record.
  2535.                        Examples
  2536.  
  2537.                         GETUSER
  2538.                         IF (U_CMNT2 = "BAD USER") THEN
  2539.                           PRINTLN "Just a friendly note to say,"
  2540.                           PRINTLN "I hope you have a rotten day!"
  2541.                           PRINTLN "Proceeding with automatic user record
  2542.                         deletion..."
  2543.                           DELUSER
  2544.                           LET U_SEC = 0
  2545.                           LET U_EXPSEC = 0
  2546.                           PUTUSER
  2547.                         ENDIF
  2548.  
  2549.                    See Also
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.                           
  2558.  
  2559.  
  2560.  
  2561.                   DIR   Statement
  2562.  
  2563.                    Function
  2564.                       Execute the file directories command with desired sub-commands.
  2565.  
  2566.                        Syntax
  2567.                       DIR cmds
  2568.                                 cmds A string  expression with  any desired  sub-commands
  2569.                           for the file directory command.
  2570.  
  2571.                        Remarks
  2572.  
  2573.                       This  statement will allow you to access file directories (the F
  2574.                           command  from  the  main  menu),  and any  file  directory  sub-
  2575.                           commands, under  PPE control.   Note  that this  statement  will
  2576.                           destroy any previously tokenized string expression.  If you have
  2577.                           string tokens pending at the time of the DIR statment you should
  2578.                           save them first  and then retokenize after the DIR  statement is
  2579.                           complete.
  2580.                        Examples
  2581.  
  2582.                         INTEGER retcode
  2583.                         SHOWOFF 
  2584.                         OPENCAP "NEWFILES.LST",retcode
  2585.                         KBDSTUFF CHR(13)
  2586.                         DIR "N;S;A;NS"
  2587.                         CLOSECAP
  2588.                         SHOWON
  2589.                         SHELL TRUE,retcode,"PKZIP","-mex NEWFILES
  2590.                         NEWFILES.LST"
  2591.                         KBDSTUFF "FLAG NEWFILES.ZIP"
  2592.  
  2593.                    See Also
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.                           
  2602.  
  2603.  
  2604.  
  2605.                   DISPFILE   Statement
  2606.  
  2607.                    Function
  2608.                       Display a specified (or alternate) file.
  2609.  
  2610.                        Syntax
  2611.                       DISPFILE file,flags
  2612.                                 file A string expression with the file name (or base file
  2613.                           name) to display.
  2614.  
  2615.                                 flags     An  integer  expression  with  alternate  file
  2616.                           flags.
  2617.  
  2618.                        Remarks
  2619.                       This statement will allow you to display a file to the user, and
  2620.                           optionally  to   have  PCBoard  look  for   alternate  security,
  2621.                           graphics, and/or language  specific files.  The  flags parameter
  2622.                           should be 0 for  no alternate searching, GRAPH (1) for  graphics
  2623.                           specific  searching, SEC  (2) for  security specific  searching,
  2624.                           LANG (4)  for language  specific searching,  or any  combination
  2625.                           thereof for multiple alternate searches simultaneously.
  2626.                        Examples
  2627.  
  2628.                         STRING s
  2629.                         DISPFILE "MNUA",SEC+GRAPH+LANG
  2630.                         INPUT "Option",s
  2631.  
  2632.                    See Also
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.                           
  2641.  
  2642.  
  2643.  
  2644.                   DISPSTR   Statement
  2645.  
  2646.                    Function
  2647.                       Display a string of text.
  2648.  
  2649.                        Syntax
  2650.                       DISPSTR str
  2651.                                 str  A string  expression  to display  (or  %filename  or
  2652.                           !PPEfile to execute).
  2653.  
  2654.                        Remarks
  2655.  
  2656.                       This  statement in  intended to  allow you  to easily  display a
  2657.                           string  to the  user and  provide some  of the  functionality of
  2658.                           PCBTEXT.   If the string to  display begins with  a percent sign
  2659.                           and is followed  by a  valid file name,  then the  file will  be
  2660.                           displayed to the caller instead of the string.  Alternately, the
  2661.                           string  could begin with an exclamation mark (and be followed by
  2662.                           a legal filename) to run a PPE file.
  2663.                        Examples
  2664.  
  2665.                         STRING s
  2666.                         INPUT "String",s
  2667.                         DISPSTR s
  2668.                         LET s = "Regular string"
  2669.                         DISPSTR s
  2670.                         DISPSTR "%C:\PCB\GEN\BRDM"
  2671.                         DISPSTR "!"+PPEPATH()+"SUBSCR.PPE"
  2672.  
  2673.                    See Also
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.                           
  2682.  
  2683.  
  2684.  
  2685.                   DISPTEXT   Statement
  2686.  
  2687.                    Function
  2688.                       Display a specified prompt from the PCBTEXT file.
  2689.  
  2690.                        Syntax
  2691.                       DISPTEXT rec,flags
  2692.                                 rec  An integer expression with the PCBTEXT record number
  2693.                           to display.
  2694.  
  2695.                                 flags     An integer expression with display flags.
  2696.  
  2697.                        Remarks
  2698.                       This  statement will  allow you to  display any prompt  from the
  2699.                           PCBTEXT file to  the user according to  a set of display  flags.
  2700.                           Valid display flags  are BELL,  DEFS, LFAFTER, LFBEFORE,  LOGIT,
  2701.                           LOGITLEFT, and NEWLINE.
  2702.                        Examples
  2703.  
  2704.                         DISPTEXT 192,BELL+NEWLINE+LOGIT
  2705.                         HANGUP
  2706.  
  2707.                    See Also
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.                           
  2716.  
  2717.  
  2718.  
  2719.                   DOINTR   Statement
  2720.  
  2721.                    Function
  2722.                       Generate a system interrupt.
  2723.  
  2724.                        Syntax
  2725.                       DOINTR int,ax,bx,cx,dx,si,di,flags,ds,es
  2726.                                 int  An integer expression with  the interrupt number  to
  2727.                           call (0 through 255).
  2728.  
  2729.                                 others      Integer   expressions  with   16-bit  register
  2730.                           values to pass to the interrupt (ax, bx, cx, dx, si, and di  are
  2731.                           general  purpose registers;  ds and  es  are segment  registers;
  2732.                           flags is the 80x86 processor status register).
  2733.  
  2734.                        Remarks
  2735.                       This statement allows practically  unlimited flexibility in PPL.
  2736.                           It  allows you  to access any  system service available  via the
  2737.                           BIOS  (video,  disk,  time,  etc),  DOS  or  other  third  party
  2738.                           interface  (DESQview,  NETBIOS,  IPX/SPX,  Btrieve, etc).    The
  2739.                           possibilities are limited only by your imagination.  Values that
  2740.                           are returned  via  register  may be  accessed via  the  REG...()
  2741.                           functions.   The values to pass to specific interrupts will vary
  2742.                           by the interrupt and  function desired.  WARNING!!!  The  DOINTR
  2743.                           function  can be a very  valuable tool when used  wisely; it can
  2744.                           also  be  extremely  destructive  when  used  improperly (either
  2745.                           accidentally or intentionally).  Use it at your own risk!
  2746.                        Examples
  2747.  
  2748.                         ' Create subdirectory - DOS function 39h
  2749.                         INTEGER addr
  2750.                         STRING  path
  2751.                         LET path = "C:\$TMPDIR$"
  2752.                         VARADDR path,addr
  2753.                         DOINTR
  2754.                         21h,39h,0,0,addr%00010000h,0,0,0,addr/00010000h,0
  2755.                         IF (REGCF() & (REGAX() = 3)) THEN
  2756.                           PRINTLN "Error:  Path not found"
  2757.                         ELSE IF (REGCF() & (REGAX() = 5)) THEN
  2758.                           PRINTLN "Error:  Access Denied"
  2759.                         ELSE IF (REGCF()) THEN
  2760.                           PRINTLN "Error:  Unknown Error"
  2761.                         ELSE
  2762.                           PRINTLN "Directory successfully created..."
  2763.                         ENDIF
  2764.  
  2765.                    See Also
  2766.  
  2767.                       B2W()  Function,  REG...() Function,  VARADDR Statement,  VAROFF
  2768.                           Statement, VARSEG Statement
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                           
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.                           
  2785.  
  2786.  
  2787.  
  2788.                   DOW()   Function
  2789.  
  2790.                    Function
  2791.                       Determine the day of the week of a particular date.
  2792.  
  2793.                        Syntax
  2794.                       DOW(dexp)
  2795.                                 dexp Any date expression.
  2796.  
  2797.                        Return Type & Value
  2798.  
  2799.                       INTEGER     Returns the day of the week from  the specified date
  2800.                           expression (dexp).  Valid return values are from 0 (Sunday) to 6
  2801.                           (Saturday).
  2802.                        Remarks
  2803.  
  2804.                       This  function  allows  you to  extract  a  particular  piece of
  2805.                           information about a DATE value, in this case the day of the week
  2806.                           of  the  date.    The  specified  date  can  be  any valid  DATE
  2807.                           expression.
  2808.                        Examples
  2809.  
  2810.                         PRINTLN "Today is:  ",DOW(DATE())
  2811.  
  2812.                    See Also
  2813.                       DAY() Function, MONTH() Function, YEAR() Function
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.                           
  2822.  
  2823.  
  2824.  
  2825.                   DTROFF   Statement
  2826.  
  2827.                    Function
  2828.                       Turn off the serial port DTR signal.
  2829.  
  2830.                        Syntax
  2831.                       DTROFF
  2832.                                 No arguments are required
  2833.  
  2834.                        Remarks
  2835.  
  2836.                       This  statement  turns off  the  serial port  DTR signal.   Most
  2837.                           modems take this condition to mean that they should hang up on a
  2838.                           caller, and this is how PCBoard uses  it.  This statement can be
  2839.                           used when you  need to hangup on a caller but don't want PCBoard
  2840.                           to  perform it's logoff processing.  Simply turn off CD checking
  2841.                           and  keyboard timeout checking  and issue  the DTROFF statement.
  2842.                           Do whatever processing you want, then turn DTR, keyboard timeout
  2843.                           testing, and CD loss testing back on to allow PCBoard to recycle
  2844.                           normally.  Note that DTR should remain  off for a period of time
  2845.                           to ensure  that the modem has time to react to it.  Consider 1/2
  2846.                           second (about 9 clock ticks) a reasonable delay.
  2847.                        Examples
  2848.  
  2849.                         BOOLEAN flag
  2850.                         KBDCHKOFF
  2851.                         CDCHKOFF
  2852.                         DTROFF
  2853.                         DELAY 18
  2854.                         DTRON
  2855.                         SENDMODEM "ATDT5551212" ' Please don't really dial
  2856.                         this number!
  2857.                         WAITFOR "CONNECT",flag,60
  2858.                         IF (!flag) SPRINLN "No connect found in 60 seconds"
  2859.                         CDCHKON
  2860.                         KBDCHKON
  2861.  
  2862.                    See Also
  2863.                       DTRON Statement
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.                           
  2872.  
  2873.  
  2874.  
  2875.                   DTRON   Statement
  2876.  
  2877.                    Function
  2878.                       Turn on the serial port DTR signal.
  2879.  
  2880.                        Syntax
  2881.                       DTRON
  2882.                                 No arguments are required
  2883.  
  2884.                        Remarks
  2885.  
  2886.                       This  statement turns  on  the serial  port  DTR signal.    This
  2887.                           statement  should be used after you've used the DTROFF statement
  2888.                           to  hangup the modem  when you  need to  hangup on a  caller but
  2889.                           don't want PCBoard to perform it's logoff processing.  Note that
  2890.                           DTR should remain  off for a period of time,  to ensure that the
  2891.                           modem has  time  to react  to it,  before  turning it  back  on.
  2892.                           Consider 1/2 second (about 9 clock ticks) a reasonable delay.
  2893.                        Examples
  2894.  
  2895.                         BOOLEAN flag
  2896.                         KBDCHKOFF
  2897.                         CDCHKOFF
  2898.                         DTROFF
  2899.                         DELAY 18
  2900.                         DTRON
  2901.                         SENDMODEM "ATDT5551212" ' Please don't really dial
  2902.                         this number!
  2903.                         WAITFOR "CONNECT",flag,60
  2904.                         IF (!flag) SPRINLN "No connect found in 60 seconds"
  2905.                         CDCHKON
  2906.                         KBDCHKON
  2907.  
  2908.                    See Also
  2909.                       DTROFF Statement
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.                           
  2918.  
  2919.  
  2920.  
  2921.                   ECHODOTS   Constant
  2922.  
  2923.                    Function
  2924.                       Set the echo dots flag in an INPUTSTR or PROMPTSTR statement.
  2925.  
  2926.                        Value
  2927.                       1 = 1b = 1o = 1h
  2928.  
  2929.                        Remarks
  2930.                       The  INPUTSTR and  PROMPTSTR  statements  have  the  ability  to
  2931.                           disable echoing of user input and  instead echo dots in place of
  2932.                           the  user's input.    This is  useful  in situations  where  the
  2933.                           information  being  entered  is  confidential  and  shouldn't be
  2934.                           revealed to  any other  party.   A good example  of this  is the
  2935.                           user's password.
  2936.  
  2937.                        Examples
  2938.  
  2939.                         STRING pwd
  2940.                         PROMPTSTR 148,pwd,12,MASK_PWD(),ECHODOTS+UPCASE
  2941.                         GETUSER
  2942.                         IF (pwd <> U_PWD) HANGUP
  2943.  
  2944.                    See Also
  2945.                       INPUTSTR Statement, PROMPTSTR Statement
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.                           
  2954.  
  2955.  
  2956.  
  2957.                   END   Statement
  2958.  
  2959.                    Function
  2960.                       Terminate PPE execution.
  2961.  
  2962.                        Syntax
  2963.                       END
  2964.                                 No arguments are required
  2965.  
  2966.                        Remarks
  2967.  
  2968.                       This statement  may be used to normally  terminate PPE execution
  2969.                           at any point.   If you do  not have one  in your program one  is
  2970.                           automatically  inserted at  the end  of your  source for  you at
  2971.                           compile time.   Additionally, if your  PPL application is  being
  2972.                           used as  a script questionnaire,  this statement  will save  any
  2973.                           responses written to channel 0 to the script answer file.
  2974.                        Examples
  2975.  
  2976.                         DATE    d
  2977.                         INTEGER i
  2978.                         STRING  s
  2979.                         LET s = "01-20-93"
  2980.                         LET d = s
  2981.                         IF (DATE() < d) THEN
  2982.                           PRINTLN "Your calendar is off!"
  2983.                           END
  2984.                         ENDIF
  2985.                         LET i = d
  2986.                         PRINTLN "The seige continues:  Day ",DATE()-i+1
  2987.                         END
  2988.  
  2989.                    See Also
  2990.                       RETURN Statement, STOP Statement
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.                           
  2999.  
  3000.  
  3001.  
  3002.                   ERASELINE   Constant
  3003.  
  3004.                    Function
  3005.                       Set the erase line flag in an INPUTSTR or PROMPTSTR statement.
  3006.  
  3007.                        Value
  3008.                       32 = 100000b = 40o = 20h
  3009.  
  3010.                        Remarks
  3011.                       The INPUTSTR and PROMPTSTR statements have the ability  to erase
  3012.                           the current line  after the  user presses  ENTER.   This is  the
  3013.                           technique used by the MORE and WAIT statements to clean up after
  3014.                           themselves.
  3015.  
  3016.                        Examples
  3017.  
  3018.                         STRING s
  3019.                         INPUTSTR "Press ENTER to
  3020.                         continue",s,@X0E,0,"",ERASELINE
  3021.  
  3022.                    See Also
  3023.                       INPUTSTR Statement, PROMPTSTR Statement
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.                           
  3032.  
  3033.  
  3034.  
  3035.                   EXIST()   Function
  3036.  
  3037.                    Function
  3038.                       Determine whether or not a file exists.
  3039.  
  3040.                        Syntax
  3041.                       EXIST(file)
  3042.                                 file A string  expression with the  drive, path  and file
  3043.                           name to check.
  3044.  
  3045.                        Return Type & Value
  3046.  
  3047.                       BOOLEAN     Returns TRUE  if the  file exists  on the  specified
  3048.                           drive and path, FALSE otherwise.
  3049.                        Remarks
  3050.  
  3051.                       It is often necessary to check for the existence of a file.  For
  3052.                           example, you  wouldn't want to  display or  otherwise process  a
  3053.                           file that doesn't  exist.  This function will report  whether or
  3054.                           not a specified file exists on a particular drive and path.  The
  3055.                           drive  will default  to  the current  drive  and the  path  will
  3056.                           default to the current directory if not specified.
  3057.                        Examples
  3058.  
  3059.                         STRING file
  3060.                         LET file = "NEWS."+STRING(CURNODE())
  3061.                         IF (EXIST(file)) DISPFILE file,0
  3062.  
  3063.                    See Also
  3064.                       FILEINF() Function
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.                           
  3073.  
  3074.  
  3075.  
  3076.                   FALSE   Constant
  3077.  
  3078.                    Function
  3079.                       To  provide  a named  constant  for the  boolean false  value in
  3080.                           boolean expressions.
  3081.  
  3082.                        Value
  3083.                       0 = 0b = 0o = 0h
  3084.  
  3085.                        Remarks
  3086.                       BOOLEAN logic is  based on two values:  TRUE  (1) and FALSE (0).
  3087.                           The  literal  numeric   constants  0  and  1  may  be   used  in
  3088.                           expressions, or you may use  the predefined named constants TRUE
  3089.                           and FALSE.   They make for more readable, maintainable  code and
  3090.                           have no more overhead than any other constant value at run time.
  3091.  
  3092.                        Examples
  3093.  
  3094.                         BOOLEAN flag
  3095.                         LET flag = TRUE
  3096.                         WHILE (!flag) DO
  3097.                           INPUTSTR
  3098.                         "Text",s,@X0E,60,"ABCDEFGHIJKLMNOPQRSTUVWXYZ
  3099.                         ",UPCASE
  3100.                           PRINTLN s
  3101.                           IF (s = "QUIT") LET flag = FALSE
  3102.                         ENDWHILE
  3103.  
  3104.                    See Also
  3105.                       TRUE Constant
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.                           
  3114.  
  3115.  
  3116.  
  3117.                   FAPPEND   Statement
  3118.  
  3119.                    Function
  3120.                       Open a file for append access.
  3121.  
  3122.                        Syntax
  3123.                       FAPPEND chan,file,am,sm
  3124.                                 chan An integer  expression with the  channel to  use for
  3125.                           the file (0 through 7).
  3126.  
  3127.                                 file A string  expression with the file  specification to
  3128.                           open.
  3129.                                 am   An integer  expression with the  desired access mode
  3130.                           for the file.
  3131.  
  3132.                                 sm   An integer expression  with the  desired share  mode
  3133.                           flags for the file.
  3134.                        Remarks
  3135.  
  3136.                       This  statement allows  a PPL  application  to open  a  file for
  3137.                           append access.  Often you need to add information to an existing
  3138.                           file without  destroying the  existing information in  the file.
  3139.                           FCREATE completely destroys the file being opened  if it already
  3140.                           exists, and FOPEN  will simply position you  at the beginning of
  3141.                           the file  where you would  overwrite data.   This statement will
  3142.                           allow you to add the necessary information to  the end of a file
  3143.                           without destroying the file or  any existing information in  the
  3144.                           file.  The chan parameter must be 0 through 7; 0 is reserved for
  3145.                           the answer file when a PPL script questionnaire is in use but is
  3146.                           available  for   all  other   applications.    However,   it  is
  3147.                           recommended you avoid channel 0 unless you really need to open 8
  3148.                           files at once.  The am parameter should  be one of the following
  3149.                           constant  values:    O_RD (for  read  access),  O_WR (for  write
  3150.                           access), or O_RW (for read/write access).  Note that the FAPPEND
  3151.                           statement actually requires  O_RW access;  whatever you  specify
  3152.                           doesn't really matter  as it will be overridden  by PPL, but you
  3153.                           must specify  it to maintain compatibility with  the FCREATE and
  3154.                           FOPEN statements.   Finally, the  sm parameter should  be one of
  3155.                           the following  constants:   S_DN (for  deny none  sharing), S_DR
  3156.                           (for deny read sharing), S_DW  (for deny write sharing), or S_DB
  3157.                           (for deny  both sharing).   Also, if the  file specified doesn't
  3158.                           exist, it will automatically be created.
  3159.                        Examples
  3160.  
  3161.                         FAPPEND 1,"C:\PCB\MAIN\PPE.LOG",O_RW,S_DB
  3162.                         FPUTLN 1,"Ran "+PPENAME()+" on "+STRING(DATE())+"
  3163.                         at "+STRING(TIME())
  3164.                         FCLOSE 1
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.                       
  3173.  
  3174.                    See Also
  3175.                       FCLOSE  Statement, FCREATE  Statement, FOPEN  Statement, FREWIND
  3176.                           Statement
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.                           
  3185.  
  3186.  
  3187.  
  3188.                   FCL   Constant
  3189.  
  3190.                    Function
  3191.                       Forces  PCBoard to count  lines and provide  prompts after every
  3192.                           screen full of information.
  3193.  
  3194.                        Value
  3195.                       2 = 10b = 2o = 2h
  3196.  
  3197.                        Remarks
  3198.                       The  STARTDISP  statement  takes  a  single  argument  to  start
  3199.                           displaying information in  a certain format.   FCL tells PCBoard
  3200.                           to  count  lines  and  pause as  needed  during  the display  of
  3201.                           information.  FNS  tells PCBoard to not stop during  the display
  3202.                           of information.   NC instructs  PCBoard to start  over with  the
  3203.                           last specified mode (FCL or FNS).
  3204.  
  3205.                        Examples
  3206.  
  3207.                         INTEGER i
  3208.                         STARTDISP FCL
  3209.                         FOR i = 1 to 100
  3210.                           PRINTLN "This is line ",i
  3211.                         NEXT
  3212.  
  3213.                    See Also
  3214.                       FNS Constant, NC Constant
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.                           
  3223.  
  3224.  
  3225.  
  3226.                   FCLOSE   Statement
  3227.  
  3228.                    Function
  3229.                       Close an open file.
  3230.  
  3231.                        Syntax
  3232.                       FCLOSE chan
  3233.                                 chan An integer expression with the open channel to close
  3234.                           (0 through 7).
  3235.  
  3236.                        Remarks
  3237.  
  3238.                       This statement should be  used to close a file channel  after it
  3239.                           has been  created/opened  with  an FCREATE,  FOPEN,  or  FAPPEND
  3240.                           statement.  If  you should forget to close your files by the end
  3241.                           of  your PPL application, PPL will  automatically close them for
  3242.                           you.   However,  if you  need to  process  many files,  it  will
  3243.                           usually be required that you open a few at a time and close them
  3244.                           before going on to the next set of files.
  3245.                        Examples
  3246.  
  3247.                         FOPEN 1,"C:\PCB\MAIN\PPE.LOG",O_RD,S_DW
  3248.                         FGET 1,hdr
  3249.                         FCLOSE 1
  3250.                         IF (hdr <> "Creating PPE.LOG file . . .") THEN
  3251.                           PRINTLN "Error: PPE.LOG invalid"
  3252.                           END
  3253.                         ENDIF
  3254.  
  3255.                    See Also
  3256.                       FAPPEND Statement,  FCREATE Statement, FOPEN  Statement, FREWIND
  3257.                           Statement
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.                           
  3266.  
  3267.  
  3268.  
  3269.                   FCREATE   Statement
  3270.  
  3271.                    Function
  3272.                       Create and open a file.
  3273.  
  3274.                        Syntax
  3275.                       FCREATE chan,file,am,sm
  3276.                                 chan An integer  expression with the  channel to  use for
  3277.                           the file (0 through 7).
  3278.  
  3279.                                 file A string  expression with the file  specification to
  3280.                           create and open.
  3281.                                 am   An integer  expression with the  desired access mode
  3282.                           for the file.
  3283.  
  3284.                                 sm   An integer expression  with the  desired share  mode
  3285.                           flags for the file.
  3286.                        Remarks
  3287.  
  3288.                       This statement  allows a PPL  application to force  the creation
  3289.                           and opening  of a file,  even if  it already  exists.   Creation
  3290.                           means that any information previously in the file (if it already
  3291.                           exists) will be lost and you will be starting over with an empty
  3292.                           file.  The chan parameter must be 0 through 7; 0 is reserved for
  3293.                           the answer file when a PPL script questionnaire is in use but is
  3294.                           available  for   all  other   applications.    However,   it  is
  3295.                           recommended you avoid channel 0 unless you really need to open 8
  3296.                           files at once.  The am parameter should be one of the  following
  3297.                           constant  values:    O_RD  (for read  access),  O_WR  (for write
  3298.                           access), or O_RW (for read/write access).  Note that the FCREATE
  3299.                           statement forces the creation of an empt file so it doesn't make
  3300.                           much sense to use O_RD, as there is  nothing to read, unless you
  3301.                           only want to create the file.  Finally, the sm  parameter should
  3302.                           be  one  of  the  following  constants:   S_DN  (for  deny  none
  3303.                           sharing), S_DR  (for deny  read sharing),  S_DW (for  deny write
  3304.                           sharing), or S_DB (for deny both sharing).
  3305.                        Examples
  3306.  
  3307.                         FCREATE 1,"C:\PCB\MAIN\PPE.LOG",O_WR,S_DN
  3308.                         FPUTLN 1,"Creating PPE.LOG file . . ."
  3309.                         FCLOSE 1
  3310.  
  3311.                    See Also
  3312.                       FAPPEND Statement,  FCLOSE Statement,  FOPEN Statement,  FREWIND
  3313.                           Statement
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.                           
  3322.  
  3323.  
  3324.  
  3325.                   FERR()   Function
  3326.  
  3327.                    Function
  3328.                       Determine  whether or  not an  error has  occurred on  a channel
  3329.                           since last checked.
  3330.  
  3331.                        Syntax
  3332.                       FERR(chan)
  3333.                                 chan An integer  expression with the  channel to  use for
  3334.                           the file (0 through 7).
  3335.  
  3336.                        Return Type & Value
  3337.  
  3338.                       BOOLEAN     Returns  TRUE  if  an  error  has  occurred  on  the
  3339.                           specified channel since last checked, FALSE otherwise.
  3340.                        Remarks
  3341.  
  3342.                       There  are  many  reasons  why  errors  can  occur  during  file
  3343.                           processing.  The drive, path  or file may not exist, the  end of
  3344.                           the  file may have  been reached, the  drive may  be full, there
  3345.                           could  be errors  with  the hardware,  and so  on.   For maximum
  3346.                           reliability,  you should use  the function  to check  for errors
  3347.                           after every file channel statement.  PCBoard will  automatically
  3348.                           handle alerting  the user of the  error in most cases.   All you
  3349.                           need  is to know that an error occurred so that you may continue
  3350.                           processing else where or clean up and exit.
  3351.                        Examples
  3352.  
  3353.                         INTEGER i
  3354.                         STRING  s
  3355.                         FOPEN 1,"FILE.DAT",O_RD,S_DW
  3356.                         IF (FERR(1)) THEN
  3357.                           PRINTLN "Error, exiting..."
  3358.                           END
  3359.                         ENDIF
  3360.                         FGET 1,s
  3361.                         WHILE (!FERR(1)) DO
  3362.                           INC i
  3363.                           PRINTLN "Line ",RIGHT(i,3),":  ",s
  3364.                           FGET 1,s
  3365.                         ENDWHILE
  3366.                         FCLOSE 1
  3367.  
  3368.                    See Also
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.                           
  3377.  
  3378.  
  3379.  
  3380.                   FGET   Statement
  3381.  
  3382.                    Function
  3383.                       Get (read) a line from an open file.
  3384.  
  3385.                        Syntax
  3386.                       FGET chan,var
  3387.                                 chan An integer expression with the channel to  read from
  3388.                           (0 through 7).
  3389.  
  3390.                                 var  The variable  into which to read the  next line from
  3391.                           chan.
  3392.  
  3393.                        Remarks
  3394.                       This statement is to be used for reading information, a  line at
  3395.                           a time, from a file that was previously opened with read access.
  3396.                           If there are  multiple items of information on the line then you
  3397.                           must parse them out manually.
  3398.                        Examples
  3399.  
  3400.                         INTEGER i
  3401.                         STRING  s
  3402.                         FOPEN 1,"FILE.DAT",O_RD,S_DW
  3403.                         IF (FERR(1)) THEN
  3404.                           PRINTLN "Error, exiting..."
  3405.                           END
  3406.                         ENDIF
  3407.                         FGET 1,s
  3408.                         WHILE (!FERR(1)) DO
  3409.                           INC i
  3410.                           PRINTLN "Line ",RIGHT(i,3),":  ",s
  3411.                           FGET 1,s
  3412.                         ENDWHILE
  3413.                         FCLOSE 1
  3414.  
  3415.                    See Also
  3416.  
  3417.                       FPUT/FPUTLN Statements, FPUTPAD Statement
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.                           
  3426.  
  3427.  
  3428.  
  3429.                   FIELDLEN   Constant
  3430.  
  3431.                    Function
  3432.                       Set  the display field  length flag in an  INPUTSTR or PROMPTSTR
  3433.                           statement.
  3434.  
  3435.                        Value
  3436.                       2 = 10b = 2o = 2h
  3437.  
  3438.                        Remarks
  3439.                       The  INPUTSTR and  PROMPTSTR  statements  have  the  ability  to
  3440.                           display the length of an input field using "( )" if the user has
  3441.                           ANSI  available.  If you want to  ensure that the user knows how
  3442.                           wide  the  input  area  is  regardless  of  ANSI  support  being
  3443.                           available, also use the GUIDE constant.
  3444.  
  3445.                        Examples
  3446.  
  3447.                         STRING pwd
  3448.                         INPUTSTR "Enter id
  3449.                         number",pwd,@X0E,4,"0123456789",FIELDLEN+GUIDE
  3450.                         IF (pwd <> "1234") PRINTLN "Bad id number"
  3451.  
  3452.                    See Also
  3453.                       GUIDE Constant, INPUTSTR Statement, PROMPTSTR Statement
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.                           
  3462.  
  3463.  
  3464.  
  3465.                   FILEINF()   Function
  3466.  
  3467.                    Function
  3468.                       Access a piece of information about a file.
  3469.  
  3470.                        Syntax
  3471.                       FILEINF(file,item)
  3472.                                 file A string expression with  the path and file  name to
  3473.                           access information about.
  3474.  
  3475.                                 item An  integer  expression with  the  desired piece  of
  3476.                           information (1 through 9) to retrieve about file.
  3477.  
  3478.                        Return Type & Value
  3479.                       BOOLEAN     Returns TRUE if file exists or FALSE if file doesn't
  3480.                           exist if item is 1.
  3481.                           DATE  Returns the date stamp of file if item is 2.
  3482.  
  3483.                           INTEGER     Returns  one  of  the  following for  the  specified
  3484.                           values of stat:
  3485.                                 4     The size of file in bytes;
  3486.                                 5     The attribute bits of file.
  3487.  
  3488.                           STRING      Returns  one  of the  following  for  the  specified
  3489.                           values of stat:
  3490.                                 6     The drive of file;
  3491.  
  3492.                                 7     The path of file;
  3493.                                 8     The base name of file;
  3494.                                 9     The extension of file.
  3495.  
  3496.                           TIME  Returns the time stamp of file if item is 3.
  3497.                        Remarks
  3498.  
  3499.                       This function  is designed to  return information about  a file.
  3500.                           The  file date, time,  size and  attributes are  accessible from
  3501.                           DOS.  In  addition, this function can parse out the drive, path,
  3502.                           base  name  and extension  if  needed  from  the  complete  file
  3503.                           specification.  Finally,  the EXIST() function is  duplicated in
  3504.                           FILEINF().
  3505.                        Examples
  3506.  
  3507.                         STRING file
  3508.                         WHILE (FILEINF(file,1)) INPUT "File",file
  3509.                         PRINTLN " Date: ",FILEINF(file,2)
  3510.                         PRINTLN " Time: ",FILEINF(file,3)
  3511.                         PRINTLN " Size: ",FILEINF(file,4)
  3512.                         PRINTLN " Attr: ",FILEINF(file,5)
  3513.                         PRINTLN "Drive: ",FILEINF(file,6)
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.                       
  3522.  
  3523.                         PRINTLN " Path: ",FILEINF(file,7)
  3524.                         PRINTLN " Name: ",FILEINF(file,8)
  3525.                         PRINTLN "  Ext: ",FILEINF(file,9)
  3526.  
  3527.                    See Also
  3528.                       EXIST() Function
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.                           
  3537.  
  3538.  
  3539.  
  3540.                   FMTCC()   Function
  3541.  
  3542.                    Function
  3543.                       Formats a credit card number for display purposes.
  3544.  
  3545.                        Syntax
  3546.                       FMTCC(sexp)
  3547.                                 sexp Any string expression.
  3548.  
  3549.                        Return Type & Value
  3550.  
  3551.                       STRING      Returns  sexp formatted in  a credit card  style for
  3552.                           display purposes.
  3553.                        Remarks
  3554.  
  3555.                       This function  will do one  of the  following:  one,  take a  13
  3556.                           character string and  format it as "XXXX XXX XXX  XXX"; two,
  3557.                           take  a  15 character  string and  format  it as  "XXXX XXXXXX
  3558.                       XXXXX";  three, take  a 16  character string  and format  it as
  3559.                           "XXXX XXXX XXXX XXXX"; or four, return the string unmodified
  3560.                           if it is not 13, 15 or 16 characters long.
  3561.                        Examples
  3562.  
  3563.                         STRING s
  3564.                         WHILE (!VALCC(s)) DO
  3565.                           INPUT "CC #",s
  3566.                           NEWLINES 2
  3567.                         ENDWHILE
  3568.                         PRINTLN CCTYPE(s)," - ",FMTCC(s)
  3569.  
  3570.                    See Also
  3571.                       CCTYPE()   Function,  VALCC()   Function,  VALDATE()   Function,
  3572.                           VALTIME() Function
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.                           
  3581.  
  3582.  
  3583.  
  3584.                   FNS   Constant
  3585.  
  3586.                    Function
  3587.                       Forces PCBoard to  not stop to provide prompts  while displaying
  3588.                           information.
  3589.  
  3590.                        Value
  3591.                       1 = 1b = 1o = 1h
  3592.  
  3593.                        Remarks
  3594.                       The  STARTDISP  statement  takes  a  single  argument  to  start
  3595.                           displaying information in  a certain format.   FCL tells PCBoard
  3596.                           to  count  lines  and  pause as  needed  during  the display  of
  3597.                           information.  FNS  tells PCBoard to not stop during  the display
  3598.                           of information.   NC instructs  PCBoard to start  over with  the
  3599.                           last specified mode (FCL or FNS).
  3600.  
  3601.                        Examples
  3602.  
  3603.                         INTEGER i
  3604.                         STARTDISP FNS
  3605.                         FOR i = 1 to 100
  3606.                           PRINTLN "This is line ",i
  3607.                         NEXT
  3608.  
  3609.                    See Also
  3610.                       FCL Constant, NC Constant
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.                           
  3619.  
  3620.  
  3621.  
  3622.                   FOPEN   Statement
  3623.  
  3624.                    Function
  3625.                       Open a file.
  3626.  
  3627.                        Syntax
  3628.                       FOPEN chan,file,am,sm
  3629.                                 chan An integer  expression with the  channel to  use for
  3630.                           the file (0 through 7).
  3631.  
  3632.                                 file A string  expression with the file  specification to
  3633.                           open.
  3634.                                 am   An integer  expression with the  desired access mode
  3635.                           for the file.
  3636.  
  3637.                                 sm   An integer expression  with the  desired share  mode
  3638.                           flags for the file.
  3639.                        Remarks
  3640.  
  3641.                       This statement allows a PPL application  to open a file for read
  3642.                           and/or  write  access  and  to  specify the  method  of  sharing
  3643.                           desired.  The chan parameter must be 0 through 7; 0 is  reserved
  3644.                           for the  answer file when  a PPL script questionnaire  is in use
  3645.                           but is  available for  all other  applications.  However,  it is
  3646.                           recommended you avoid channel 0 unless you really need to open 8
  3647.                           files at once.  The am parameter should  be one of the following
  3648.                           constant values:    O_RD  (for read  access),  O_WR  (for  write
  3649.                           access), or  O_RW (for read/write  access).  Note  that the O_RD
  3650.                           constant  expects the  file  to  already exist;  the other  open
  3651.                           constants  will create  the file  if it  already  doesn't exist.
  3652.                           Finally,  the  sm  parameter  should  be  one of  the  following
  3653.                           constants:   S_DN (for deny  none sharing), S_DR  (for deny read
  3654.                           sharing), S_DW (for deny write  sharing), or S_DB (for deny both
  3655.                           sharing).
  3656.                        Examples
  3657.  
  3658.                         STRING hdr
  3659.                         FOPEN 1,"C:\PCB\MAIN\PPE.LOG",O_RD,S_DW
  3660.                         FGET 1,hdr
  3661.                         FCLOSE 1
  3662.                         IF (hdr <> "Creating PPE.LOG file . . .") THEN
  3663.                           PRINTLN "Error: PPE.LOG invalid"
  3664.                           END
  3665.                         ENDIF
  3666.  
  3667.                    See Also
  3668.                       FAPPEND Statement, FCLOSE Statement, FCREATE Statement,  FREWIND
  3669.                           Statement
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.                           
  3678.  
  3679.  
  3680.  
  3681.                   FOR/NEXT   Statement
  3682.  
  3683.                    Function
  3684.                       Execute a block of statments for a range of values.
  3685.  
  3686.                        Syntax
  3687.                       FOR    var    =    start    TO    end    [STEP    inc]
  3688.  
  3689.                               s   t   a   t   e   m   e   n   t   (   s   )
  3690.  
  3691.                       NEXT
  3692.                                 var  The index variable for the loop  that will be set to
  3693.                           each value.
  3694.  
  3695.                                 start     Any valid PPL expression.
  3696.                                 end   Any valid PPL expression.
  3697.  
  3698.                                 inc   Any valid PPL expression.  1 if not specified.
  3699.                        Remarks
  3700.  
  3701.                       A  FOR loop  can consist  of  one or  more statements.    At the
  3702.                           beginning  of   the  loop   the  specified  variable   (var)  is
  3703.                           initialized  to the start value.  It is then checked against the
  3704.                           end value.  If start is greater than end (for positive values of
  3705.                           inc) or less than end (for negative values of inc) then the loop
  3706.                           terminates.    Otherwise all  the  statements  in  the loop  are
  3707.                           executed in  order.  At the  NEXT statement the inc  value (1 if
  3708.                           not  explicitly defined) is  added to var and  the loop value is
  3709.                           retested as described above.
  3710.                        Examples
  3711.  
  3712.                         BOOLEAN p(100)
  3713.                         INTEGER i
  3714.                         FOR i = 1 TO 100 ' Initialize all to TRUE
  3715.                           LET p(i) = TRUE
  3716.                         NEXT
  3717.                         LET p(1) = FALSE
  3718.                         FOR i = 4 TO 100 STEP 2 ' Initialize every other
  3719.                         one to FALSE
  3720.                           LET p(i) = FALSE
  3721.                         NEXT
  3722.  
  3723.                    See Also
  3724.                       IF/ELSEIF/ELSE/ENDIF Statement, WHILE/ENDWHILE Statement
  3725.  
  3726.  
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.                           
  3733.  
  3734.  
  3735.  
  3736.                   FORWARD   Statement
  3737.  
  3738.                    Function
  3739.                       Move the cursor forward a specified number of columns.
  3740.  
  3741.                        Syntax
  3742.                       FORWARD numcols
  3743.                                 numcols   An integer expression of the number of columns
  3744.                           to move forward.  Valid values are 1 through 79.
  3745.  
  3746.                        Remarks
  3747.  
  3748.                       This statement will move the cursor forward, nondestructively, a
  3749.                           specified number of columns.  It will work with or without ANSI.
  3750.                           If ANSI is available (as reported by the ANSION() function) then
  3751.                           it will use  an ANSI positioning command; otherwise it  will re-
  3752.                           display the specified  number of characters that are  already on
  3753.                           screen.   ANSI is usually faster, but re-displaying the existing
  3754.                           information  will get the  job done.   Note that you  cannot use
  3755.                           this function to  move beyond column 80; to  do so would require
  3756.                           ANSI to move back up if necessary.  So, if the cursor is already
  3757.                           in column  80 this  statement will have no  effect.  And  if the
  3758.                           cursor is  in column 1 the maximum you  could move forward would
  3759.                           be 79 (column 1 + 79 columns = column 80).
  3760.                        Examples
  3761.  
  3762.                         PRINT "PIRNT is wrong"
  3763.                         DELAY 5*182/10
  3764.                         BACKUP 13
  3765.                         PRINT "RI"
  3766.                         FORWARD 6
  3767.                         PRINT "RIGHT"
  3768.                         DELAY 5*182/10
  3769.                         NEWLINE
  3770.                         WAIT
  3771.  
  3772.                    See Also
  3773.                       ANSION()  Function, ANSIPOS Statement,  BACKUP Statement, GETX()
  3774.                           Function, GETY() Function, GRAFMODE() Function
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.  
  3782.                           
  3783.  
  3784.  
  3785.  
  3786.                   FPUT/FPUTLN   Statements
  3787.  
  3788.                    Function
  3789.                       Put (write) a  line to an open  file (with an optional  carriage
  3790.                           return/line feed appended).
  3791.  
  3792.                        Syntax
  3793.                       F  P  U  T    c  h  a  n  ,  e  x  p  [  ,  e  x  p  ]
  3794.  
  3795.                       -                o                r                -
  3796.  
  3797.                       FPUT chan[,exp[,exp]]
  3798.                                 chan An  integer expression with the  channel to write to
  3799.                           (0 through 7).
  3800.  
  3801.                                 exp  An expression of  any type to evaluate and  write to
  3802.                           chan.
  3803.  
  3804.                        Remarks
  3805.                       These statements will evalutate zero, one or more expressions of
  3806.                           any type  and write the results to the specified channel number.
  3807.                           The FPUTLN  statement will  append a  carriage return/line  feed
  3808.                           sequence to  the end  of the expressions;  FPUT will not.   Note
  3809.                           that at  least one expression must be specified for FPUT, unlike
  3810.                           the FPUTLN statement which need not have any arguments passed to
  3811.                           it other than the channel number.
  3812.                        Examples
  3813.  
  3814.  
  3815.                         FAPPEND 1,"FILE.DAT",O_WR,S_DB
  3816.                         FPUT 1,U_NAME()," ",DATE()
  3817.                         FPUTLN 1," ",TIME()," ",CURSEC()
  3818.                         FPUT 1,"Logged!"
  3819.                         FPUTLN 1
  3820.                         FPUTLN 1,"Have a nice"+" day!"
  3821.                         FCLOSE 1
  3822.  
  3823.                    See Also
  3824.  
  3825.                       FGET Statement, FPUTPAD Statement
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.                           
  3834.  
  3835.  
  3836.  
  3837.                   FPUTPAD   Statement
  3838.  
  3839.                    Function
  3840.                       Put (write) a line of a specified width to an open file.
  3841.  
  3842.                        Syntax
  3843.                       FPUT chan,exp,width
  3844.                                 chan An  integer expression with the  channel to write to
  3845.                           (0 through 7).
  3846.  
  3847.                                 exp  An expression  of any type to evaluate  and write to
  3848.                           chan.
  3849.                                 width     An integer expression with the width to use to
  3850.                           write exp.  Valid values are -256 through 256
  3851.  
  3852.                        Remarks
  3853.                       This statement  will evalutate an  expressions of  any type  and
  3854.                           write  the  result  to  the  specified  channel  number.    This
  3855.                           statement will  append a  carriage return/line feed  sequence to
  3856.                           the  end of  the expression  after padding  it to  the specified
  3857.                           width  with spaces.   If  width is  positive,  then exp  will be
  3858.                           written right justified (left padded) to the  file.  If width is
  3859.                           negative, then exp will be written left justified (right padded)
  3860.                           to the file.
  3861.  
  3862.                        Examples
  3863.  
  3864.  
  3865.                         FAPPEND 1,"FILE.DAT",O_WR,S_DB
  3866.                         FPUTPAD 1,U_NAME(),40
  3867.                         FPUTPAD 1,U_DATE(),20
  3868.                         FPUTPAD 1,U_TIME(),20
  3869.                         FCLOSE 1
  3870.  
  3871.                    See Also
  3872.                       FGET Statement, FPUT/FPUTLN Statements
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.                           
  3881.  
  3882.  
  3883.  
  3884.                   FRESHLINE   Statement
  3885.  
  3886.                    Function
  3887.                       Move the cursor to a fresh line for output.
  3888.  
  3889.                        Syntax
  3890.                       FRESHLINE
  3891.                                 No arguments are required
  3892.  
  3893.                        Remarks
  3894.  
  3895.                       Often while displaying information to the screen you  will print
  3896.                           a  certain amount then want to make sure you are on a clean line
  3897.                           before  continuing.  This statement checks  to see if you are in
  3898.                           column 1 of the current line.  If you are, it assumes you are on
  3899.                           a clean line and does nothing.   Otherwise, it calls the NEWLINE
  3900.                           statement for you automatically.
  3901.                        Examples
  3902.  
  3903.                         INTEGER i, end
  3904.                         LET end = RANDOM(20)
  3905.                         FOR i = 1 TO end
  3906.                           PRINT RIGHT(RANDOM(10000),8)
  3907.                         NEXT
  3908.                         FRESHLINE
  3909.                         PRINTLN "Now we continue . . ."
  3910.  
  3911.                    See Also
  3912.                       NEWLINE Statement, NEWLINES Statement
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.                           
  3921.  
  3922.  
  3923.  
  3924.                   FREWIND   Statement
  3925.  
  3926.                    Function
  3927.                       Rewind an open file.
  3928.  
  3929.                        Syntax
  3930.                       FREWIND chan
  3931.                                 chan An  integer  expression  with  the  open  channel to
  3932.                           rewind (0 through 7).
  3933.  
  3934.                        Remarks
  3935.  
  3936.                       This statement should  be used when  you need to  rewind a  file
  3937.                           channel after it has been created/opened with an FCREATE, FOPEN,
  3938.                           or  FAPPEND statement.  Rewinding a file channel will flush file
  3939.                           buffers,  commit the  file  to  disk, and  reposition  the  file
  3940.                           pointer to the beginning of  the file.  Useful when you  need to
  3941.                           start over  processing a file  that may have  changed and  don't
  3942.                           want to close and re-open the file.
  3943.                        Examples
  3944.  
  3945.                         STRING s
  3946.                         FAPPEND 1,"C:\PCB\MAIN\PPE.LOG",O_RW,S_DN
  3947.                         FPUTLN 1,U_NAME()
  3948.                         FREWIND 1
  3949.                         WHILE (!FERR(1)) DO
  3950.                           FGET 1,s
  3951.                           PRINTLN s
  3952.                         ENDWHILE
  3953.                         FCLOSE 1
  3954.  
  3955.                    See Also
  3956.                       FAPPEND  Statement, FCLOSE  Statement, FCREATE  Statement, FOPEN
  3957.                           Statement
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.                           
  3966.  
  3967.  
  3968.  
  3969.                   F_EXP   Constant
  3970.  
  3971.                    Function
  3972.                       Set  the  conference  expired  access  flag  in  a  CONFFLAG  or
  3973.                           CONFUNFLAG statement.
  3974.  
  3975.                        Value
  3976.                       2 = 10b = 2o = 2h
  3977.  
  3978.                        Remarks
  3979.                       There are  five flags per  conference maintained for  each user.
  3980.                           This  flag  is  used  to  indicate  whether  or  not  a user  is
  3981.                           registered  in a specified  conference after  their subscription
  3982.                           expiration date.
  3983.  
  3984.                        Examples
  3985.  
  3986.                         CONFUNFLAG 5,F_REG+F_EXP+F_SEL ' Clear reg, exp &
  3987.                         sel flags from conf 5
  3988.                         CONFFLAG 9,F_REG+F_EXP+F_SEL   ' Set reg, exp & sel
  3989.                         flags for conf 9
  3990.  
  3991.                    See Also
  3992.                       F_MW Constant, F_REGConstant, F_SEL Constant, F_SYS Constant
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.                           
  4001.  
  4002.  
  4003.  
  4004.                   F_MW   Constant
  4005.  
  4006.                    Function
  4007.                       Set the conference mail waiting flag in a CONFFLAG or CONFUNFLAG
  4008.                           statement.
  4009.  
  4010.                        Value
  4011.                       10 = 10000b = 20o = 10h
  4012.  
  4013.                        Remarks
  4014.                       There are  five flags per  conference maintained for  each user.
  4015.                           This  flag is used  to indicate  whether or not a  user has mail
  4016.                           waiting in a specified conference.
  4017.  
  4018.                        Examples
  4019.  
  4020.                         CONFUNFLAG 5,F_MW ' Clear mail waiting flag from
  4021.                         conf 5
  4022.                         CONFFLAG 9,F_MW   ' Set mail waiting flag for conf
  4023.                         9
  4024.  
  4025.                    See Also
  4026.                       F_EXP Constant, F_REGConstant, F_SEL Constant, F_SYS Constant
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.                           
  4035.  
  4036.  
  4037.  
  4038.                   F_REG   Constant
  4039.  
  4040.                    Function
  4041.                       Set the conference registration flag in a CONFFLAG or CONFUNFLAG
  4042.                           statement.
  4043.  
  4044.                        Value
  4045.                       1 = 1b = 1o = 1h
  4046.  
  4047.                        Remarks
  4048.                       There are  five flags per  conference maintained for  each user.
  4049.                           This  flag  is  used  to  indicate  whether  or  not  a user  is
  4050.                           registered in a specified conference.
  4051.  
  4052.                        Examples
  4053.  
  4054.                         CONFUNFLAG 5,F_REG+F_EXP+F_SEL ' Clear reg, exp &
  4055.                         sel flags from conf 5
  4056.                         CONFFLAG 9,F_REG+F_EXP+F_SEL   ' Set reg, exp & sel
  4057.                         flags for conf 9
  4058.  
  4059.                    See Also
  4060.                       F_EXP Constant, F_MW Constant, F_SEL Constant, F_SYS Constant
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.                           
  4069.  
  4070.  
  4071.  
  4072.                   F_SEL   Constant
  4073.  
  4074.                    Function
  4075.                       Set the  conference selected  flag in a  CONFFLAG or  CONFUNFLAG
  4076.                           statement.
  4077.  
  4078.                        Value
  4079.                       4 = 100b = 4o = 4h
  4080.  
  4081.                        Remarks
  4082.                       There are  five flags per  conference maintained for  each user.
  4083.                           This  flag  is used  to indicate  whether  or not  a user  has a
  4084.                           specified conference selected for message scans.
  4085.  
  4086.                        Examples
  4087.  
  4088.                         CONFUNFLAG 5,F_REG+F_EXP+F_SEL ' Clear reg, exp &
  4089.                         sel flags from conf 5
  4090.                         CONFFLAG 9,F_REG+F_EXP+F_SEL   ' Set reg, exp & sel
  4091.                         flags for conf 9
  4092.  
  4093.                    See Also
  4094.                       F_EXP Constant, F_MW Constant, F_REG Constant, F_SYS Constant
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.                           
  4103.  
  4104.  
  4105.  
  4106.                   F_SYS   Constant
  4107.  
  4108.                    Function
  4109.                       Set the conference SysOp access flag in a CONFFLAG or CONFUNFLAG
  4110.                           statement.
  4111.  
  4112.                        Value
  4113.                       8 = 1000b = 10o = 8h
  4114.  
  4115.                        Remarks
  4116.                       There are  five flags per  conference maintained for  each user.
  4117.                           This  flag is  used  to  indicate  whether or  not  a  user  has
  4118.                           conference SysOp access in a specified conference.
  4119.  
  4120.                        Examples
  4121.  
  4122.                         CONFUNFLAG 5,F_SYS ' Remove (unflag) conf sysop
  4123.                         access from conf 5
  4124.                         CONFFLAG 9,F_SYS   ' Grant (flag) conf sysop access
  4125.                         for conf 9
  4126.  
  4127.                    See Also
  4128.                       F_EXP Constant, F_MW Constant, F_REG Constant, F_SEL Constant
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.                           
  4137.  
  4138.  
  4139.  
  4140.                   GETENV()   Function
  4141.  
  4142.                    Function
  4143.                       Access the value of an environment variable.
  4144.  
  4145.                        Syntax
  4146.                       GETENV(name)
  4147.                                 name A string expression with the name of the environment
  4148.                           variable to access.
  4149.  
  4150.                        Return Type & Value
  4151.  
  4152.                       STRING      Returns  the  value   of  the  environment  variable
  4153.                           specified by name.
  4154.                        Remarks
  4155.  
  4156.                       This  function allows you to access the value of any environment
  4157.                           variable set at  the time  that PCBoard  was started.   So,  for
  4158.                           example, the PATH  environment variable could be used  to access
  4159.                           data files somewhere on the path.
  4160.                        Examples
  4161.  
  4162.                         STRING path
  4163.                         LET path = GETENV()
  4164.                         TOKENIZE path
  4165.                         LET path = "DATAFILE.TXT"
  4166.                         WHILE (!EXIST(path) & (TOKCOUNT() > 0)) DO
  4167.                           LET PATH = GETTOKEN()+"DATAFILE.TXT"
  4168.                         ENDWHILE
  4169.                         IF (EXIST(path)) PRINTLN "Found ",path,"!"
  4170.  
  4171.                    See Also
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.                           
  4180.  
  4181.  
  4182.  
  4183.                   GETTOKEN   Statement
  4184.  
  4185.                    Function
  4186.                       Retrieve a token from a previous TOKENIZE statement.
  4187.  
  4188.                        Syntax
  4189.                       GETTOKEN var
  4190.                                 var  Variable to store the retrieved token in.
  4191.  
  4192.                        Remarks
  4193.  
  4194.                       One of the strongest features of PCBoard is it's ability to take
  4195.                           a  series of stacked parameters from a command line and use them
  4196.                           all  at once instead of requiring  the user to navigate a series
  4197.                           of menus and  select one option at  each step of  the way.   The
  4198.                           TOKENIZE statement is the PPL equivalent of what PCBoard uses to
  4199.                           break a  command line  into individual commands  (tokens).   The
  4200.                           number of tokens  available may be  accessed via the  TOKCOUNT()
  4201.                           function, and each token may be accessed, one at a time,  by the
  4202.                           GETTOKEN statement and/or the GETTOKEN() function.
  4203.                        Examples
  4204.  
  4205.                         STRING  cmdline
  4206.                         INPUT "Command",cmdline
  4207.                         TOKENIZE cmdline
  4208.                         PRINTLN "You entered ",TOKCOUNT()," tokens"
  4209.                         WHILE (TOKCOUNT() > 0) DO
  4210.                           GETTOKEN cmdline
  4211.                           PRINTLN "Token:  ",CHR(34),cmdline,CHR(34)
  4212.                         ENDWHILE
  4213.  
  4214.                    See Also
  4215.                       GETTOKEN()  Function, TOKCOUNT()  Function, TOKENIZE  Statement,
  4216.                           TOKENSTR() Function
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.                           
  4225.  
  4226.  
  4227.  
  4228.                   GETTOKEN()   Function
  4229.  
  4230.                    Function
  4231.                       Retrieve a token from a previous TOKENIZE statement.
  4232.  
  4233.                        Syntax
  4234.                       GETTOKEN()
  4235.                                 No arguments are required
  4236.  
  4237.                        Return Type & Value
  4238.  
  4239.                       STRING      Returns  the  next  available  token  from the  most
  4240.                           recent TOKENIZE statement.
  4241.                        Remarks
  4242.  
  4243.                       One of the strongest features of PCBoard is it's ability to take
  4244.                           a series of stacked parameters  from a command line and use them
  4245.                           all at once instead  of requiring the user to  navigate a series
  4246.                           of menus  and select one  option at each  step of the way.   The
  4247.                           TOKENIZE statement is the PPL equivalent of what PCBoard uses to
  4248.                           break a  command line  into individual  commands (tokens).   The
  4249.                           number  of tokens available  may be accessed  via the TOKCOUNT()
  4250.                           function, and each token may be accessed, one at  a time, by the
  4251.                           GETTOKEN statement and/or the GETTOKEN() function.
  4252.                        Examples
  4253.  
  4254.                         STRING  cmdline
  4255.                         INPUT "Command",cmdline
  4256.                         TOKENIZE cmdline
  4257.                         PRINTLN "You entered ",TOKCOUNT()," tokens"
  4258.                         WHILE (TOKCOUNT() > 0) DO
  4259.                           LET cmdline = GETTOKEN()
  4260.                           PRINTLN "Token:  ",CHR(34),cmdline,CHR(34)
  4261.                         ENDWHILE
  4262.  
  4263.                    See Also
  4264.                       GETTOKEN Statement,  TOKCOUNT()  Function,  TOKENIZE  Statement,
  4265.                           TOKENSTR() Function
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.                           
  4274.  
  4275.  
  4276.  
  4277.                   GETUSER   Statement
  4278.  
  4279.                    Function
  4280.                       Fill predeclared variables with values from user record.
  4281.  
  4282.                        Syntax
  4283.                       GETUSER
  4284.                                 No arguments are required
  4285.  
  4286.                        Remarks
  4287.  
  4288.                       There are many predeclared variables which may be used to access
  4289.                           and  change  user  information.    However,   their  values  are
  4290.                           undefined until you  use the GETUSER statement,  and any changes
  4291.                           you make don't take hold until you use the PUTUSER statement.
  4292.                        Examples
  4293.  
  4294.                         IF (PSA(3)) THEN
  4295.                           GETUSER
  4296.                           INPUT "Addr 1",U_ADDR(0)
  4297.                           INPUT "Addr 2",U_ADDR(1)
  4298.                           INPUT "City  ",U_ADDR(2)
  4299.                           INPUT "State ",U_ADDR(3)
  4300.                           INPUT "ZIP   ",U_ADDR(4)
  4301.                           INPUT "Cntry ",U_ADDR(5)
  4302.                           PUTUSER
  4303.                         ENDIF
  4304.  
  4305.                    See Also
  4306.                       PUTUSER Statement
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.                           
  4315.  
  4316.  
  4317.  
  4318.                   GETX()   Function
  4319.  
  4320.                    Function
  4321.                       Report the X coordinate (column) of the cursor on screen.
  4322.  
  4323.                        Syntax
  4324.                       GETX()
  4325.                                 No arguments are required
  4326.  
  4327.                        Return Type and Value
  4328.  
  4329.                       INTEGER     Returns the column (1-80) of the cursor on screen.
  4330.                        Remarks
  4331.  
  4332.                       This function is used to query the ANSI emulator in PCBoard  the
  4333.                           current X position of the cursor.  It may be used for saving the
  4334.                           cursor position  for future  use or  for saving  the  horizontal
  4335.                           cursor position while  changing the vertical  position with  the
  4336.                           ANSIPOS statement.
  4337.                        Examples
  4338.  
  4339.                         INTEGER x,y
  4340.                         STRING s
  4341.  
  4342.                         WHILE (UPPER(s) <> "QUIT") DO
  4343.  
  4344.                           INPUT "Text",s
  4345.                           PRINTLN " - ",s
  4346.  
  4347.                           LET x = GETX()
  4348.                           LET y = GETY()
  4349.                           IF (y = 23) THEN
  4350.                             CLS
  4351.                             LET x = GETX()
  4352.                             LET y = GETY()
  4353.                           ENDIF
  4354.  
  4355.                           ANSIPOS 40,23
  4356.                           PRINT "@X8Fs=",s
  4357.                           ANSIPOS x,y
  4358.  
  4359.                         ENDWHILE
  4360.  
  4361.                    See Also
  4362.                       ANSIPOS Statement, ANSION()  Function, BACKUP Statement, FORWARD
  4363.                           Statement, GETY() Function, GRAFMODE() Function
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.                           
  4372.  
  4373.  
  4374.  
  4375.                   GETY()   Function
  4376.  
  4377.                    Function
  4378.                       Report the Y coordinate (row) of the cursor on screen.
  4379.  
  4380.                        Syntax
  4381.                       GETY()
  4382.                                 No arguments are required
  4383.  
  4384.                        Return Type and Value
  4385.  
  4386.                       INTEGER     Returns the row (1-23) of the cursor on screen.
  4387.                        Remarks
  4388.  
  4389.                       This function is used to query the ANSI emulator in PCBoard  the
  4390.                           current Y position of the cursor.  It may be used for saving the
  4391.                           cursor position for future use or for saving the verticle cursor
  4392.                           position while changing the horizontal position with the ANSIPOS
  4393.                           statement.
  4394.                        Examples
  4395.  
  4396.                         INTEGER x,y
  4397.                         STRING s
  4398.  
  4399.                         WHILE (UPPER(s) <> "QUIT") DO
  4400.  
  4401.                           INPUT "Text",s
  4402.                           PRINTLN " - ",s
  4403.  
  4404.                           LET x = GETX()
  4405.                           LET y = GETY()
  4406.                           IF (y = 23) THEN
  4407.                             CLS
  4408.                             LET x = GETX()
  4409.                             LET y = GETY()
  4410.                           ENDIF
  4411.  
  4412.                           ANSIPOS 40,23
  4413.                           PRINT "@X8Fs=",s
  4414.                           ANSIPOS x,y
  4415.  
  4416.                         ENDWHILE
  4417.  
  4418.                    See Also
  4419.                       ANSIPOS Statement, ANSION()  Function, BACKUP Statement, FORWARD
  4420.                           Statement, GETX() Function, GRAFMODE() Function
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.                           
  4429.  
  4430.  
  4431.  
  4432.                   GOODBYE   Statement
  4433.  
  4434.                    Function
  4435.                       Log  the user  off  as though  they had  typed  the G  (goodbye)
  4436.                           command.
  4437.  
  4438.                        Syntax
  4439.                       GOODBYE
  4440.                                 No arguments are required
  4441.  
  4442.                        Remarks
  4443.  
  4444.                       There are  multiple ways  for the user  to log off.   One  is by
  4445.                           typing G at the  command prompt.   That will warn  them if  they
  4446.                           have files flagged for  download and (optionally) confirm  their
  4447.                           selection  (incase they accidentally hit G  and ENTER).  Another
  4448.                           is the BYE command.  PCBoard assumes that, if the user typed BYE
  4449.                           instead  of G, that they really want  to log off, didn't type it
  4450.                           in accidentally, and  want to leave now.  The  GOODBYE statement
  4451.                           performs the same processing as the PCBoard G command.
  4452.                        Examples
  4453.  
  4454.                         STRING s
  4455.                         INPUT "What do you want to do",s
  4456.                         IF     (s = "G")   THEN GOODBYE
  4457.                         ELSEIF (s = "BYE") THEN BYE
  4458.                         ELSE                    KBDSTUFF s
  4459.                         ENDIF
  4460.  
  4461.                    See Also
  4462.                       BYE Statement, HANGUP Statement
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.                           
  4471.  
  4472.  
  4473.  
  4474.                   GOSUB   Statement
  4475.  
  4476.                    Function
  4477.                       Transfer program control and save the return information.
  4478.  
  4479.                        Syntax
  4480.                       GOSUB label
  4481.                                 label     The  label   to  which   control   should   be
  4482.                           transferred.
  4483.  
  4484.                        Remarks
  4485.  
  4486.                       It  is  often  necessary   to  perform  an  indentical  set   of
  4487.                           instructions several times  in a program.  This leaves  you with
  4488.                           two choices.  One, rewrite  the code several times (and hope you
  4489.                           do it right  each time), or two, write it  once as a subroutine,
  4490.                           then use GOSUB to run it.   This statement will save the address
  4491.                           of  the next line so  that a RETURN statement at  the end of the
  4492.                           subroutine can  instruct PPL to  resume execution with  the line
  4493.                           following the GOSUB.
  4494.                        Examples
  4495.  
  4496.                         STRING Question, Answer
  4497.                         LET Question = "What is your street address ..."
  4498.                         GOSUB ask
  4499.                         LET Question = "What is your city, state and zip
  4500.                         ..."
  4501.                         GOSUB ask
  4502.                         END
  4503.  
  4504.                         :ask ' Sub to ask a question, get an answer, and
  4505.                         log them to a file
  4506.                         LET Answer = ""
  4507.                         PRINTLN "@X0E",Question
  4508.                         INPUT "",Answer
  4509.                         NEWLINES 2
  4510.                         FPUTLN 0,"Q: ",STRIPATX(Question)
  4511.                         FPUTLN 0,"A: ",Answer
  4512.                         RETURN
  4513.  
  4514.                    See Also
  4515.                       GOTO Statement, RETURN Statement
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.                           
  4524.  
  4525.  
  4526.  
  4527.                   GOTO   Statement
  4528.  
  4529.                    Function
  4530.                       Transfer program control.
  4531.  
  4532.                        Syntax
  4533.                       GOTO label
  4534.                                 label     The  label   to  which   control   should   be
  4535.                           transferred.
  4536.  
  4537.                        Remarks
  4538.  
  4539.                       GOTO  is  an  essential  part of  just  about  every programming
  4540.                           language, and it is also an overused  part of every one of those
  4541.                           languages.  When  you need to make a  decision and alter program
  4542.                           flow  based on  some condition  it  is a  necessary  evil.   For
  4543.                           example, it is very useful in getting out of deeply nested loops
  4544.                           when  a critical error of some sort  occurs.  For the most part,
  4545.                           avoid it if at  all possible.  Look  for other options to  write
  4546.                           your program, such as block IF, WHILE, and FOR statements.  They
  4547.                           are much easier  to understand and maintain than code  with GOTO
  4548.                           statements sprinkled liberally throughout.
  4549.                        Examples
  4550.  
  4551.                         INTEGER i
  4552.                         STRING  s
  4553.  
  4554.                         FOPEN 1,"FILE.DAT",O_RD,S_DW
  4555.  
  4556.                         WHILE (UPPER(s) <> "QUIT") DO
  4557.                           FGET 1,s
  4558.                           IF (FERR(1)) THEN
  4559.                             PRINTLN "Error, aborting..."
  4560.                             GOTO exit
  4561.                           ENDIF
  4562.                           INC i
  4563.                           PRINTLN "Line ",i,": ",s
  4564.                         ENDWHILE
  4565.  
  4566.                         :exit
  4567.                         FCLOSE 1
  4568.  
  4569.                    See Also
  4570.                       GOSUB Statement, RETURN Statement
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.                           
  4579.  
  4580.  
  4581.  
  4582.                   GRAFMODE()   Function
  4583.  
  4584.                    Function
  4585.                       Report the graphics mode in use.
  4586.  
  4587.                        Syntax
  4588.                       GRAFMODE()
  4589.                                 No arguments are required
  4590.  
  4591.                        Return Type and Value
  4592.  
  4593.                       STRING      Returns  a  letter indicating  the current  graphics
  4594.                           supported.
  4595.                        Remarks
  4596.  
  4597.                       This function will  return one of four possible responses.   "N"
  4598.                           will be returned if no  graphics support is currently available.
  4599.                           "A"  will be returned  for non-graphics users that  do have ANSI
  4600.                           support available  for positioning.   "G" will  be returned  for
  4601.                           users  who support  full ANSI  graphics.   Finally, "R"  will be
  4602.                           returned for users who support RIPscrip.
  4603.                        Examples
  4604.  
  4605.                         IF      (GRAFMODE() = "R") THEN PRINT "RIPscrip"
  4606.                         ELSE IF (GRAFMODE() = "G") THEN PRINT "Full ANSI"
  4607.                         ELSE IF (GRAFMODE() = "A") THEN PRINT "ANSI
  4608.                         positioning"
  4609.                         ELSE IF (GRAFMODE() = "N") THEN PRINT "No"
  4610.                         ELSE                            PRINT "Unknown"
  4611.                         ENDIF
  4612.                         PRINTLN " Graphics Supported"
  4613.  
  4614.                    See Also
  4615.                       ANSIPOS Statement, ANSION() Function, BACKUP  Statement, FORWARD
  4616.                           Statement, GETX() Function, GETY() Function
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.                           
  4625.  
  4626.  
  4627.  
  4628.                   GRAPH   Constant
  4629.  
  4630.                    Function
  4631.                       Set  the graphics  specific  file  search  flag  in  a  DISPFILE
  4632.                           statement.
  4633.  
  4634.                        Value
  4635.                       1 = 1b = 1o = 1h
  4636.  
  4637.                        Remarks
  4638.                       The DISPFILE statement will  allow you to display a  file to the
  4639.                           user,  and  optionally  to  have  PCBoard  look  for   alternate
  4640.                           security, graphics,  and/or language specific files.   This flag
  4641.                           instructs PCBoard  to search for alternate  graphics files (ANSI
  4642.                           or  RIPscrip) via the G and R suffix.  The current graphics mode
  4643.                           may be obtained with the GRAFMODE() function.
  4644.  
  4645.                        Examples
  4646.  
  4647.                         STRING s
  4648.                         DISPFILE "MNUA",SEC+GRAPH+LANG
  4649.                         INPUT "Option",s
  4650.  
  4651.                    See Also
  4652.                       DISPFILE  Statement,  GRAFMODE()  Function,  LANG  Constant, SEC
  4653.                           Constant
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.                           
  4662.  
  4663.  
  4664.  
  4665.                   GUIDE   Constant
  4666.  
  4667.                    Function
  4668.                       Set the  display input guide  flag in an  INPUTSTR or  PROMPTSTR
  4669.                           statement.
  4670.  
  4671.                        Value
  4672.                       4 = 100b = 4o = 4h
  4673.  
  4674.                        Remarks
  4675.                       The  INPUTSTR and  PROMPTSTR  statements  have  the  ability  to
  4676.                           display  the  length  of  an  input field,  regardless  of  ANSI
  4677.                           availability,  if  you  use  this  constant  with  the  FIELDLEN
  4678.                           constant.  If ANSI  is not available and this constant  is used,
  4679.                           the user  will see the  input field width  marked using  "(---)"
  4680.                           above the input field.
  4681.  
  4682.                        Examples
  4683.  
  4684.                         STRING pwd
  4685.                         INPUTSTR "Enter id
  4686.                         number",pwd,@X0E,4,"0123456789",FIELDLEN+GUIDE
  4687.                         IF (pwd <> "1234") PRINTLN "Bad id number"
  4688.  
  4689.                    See Also
  4690.                       FIELDLEN Constant, INPUTSTR Statement, PROMPTSTR Statement
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.                           
  4699.  
  4700.  
  4701.  
  4702.                   HANGUP   Statement
  4703.  
  4704.                    Function
  4705.                       Hangup on the user and perform abnormal logoff processing.
  4706.  
  4707.                        Syntax
  4708.                       HANGUP
  4709.                                 No arguments are required
  4710.  
  4711.                        Remarks
  4712.  
  4713.                       This statement is useful in situations where you need to get the
  4714.                           caller off  immediately without any  delay or notice.   It  will
  4715.                           hangup  on  the caller,  do  all logoff  processing, and  log an
  4716.                           abnormal logoff to the callers log.
  4717.                        Examples
  4718.  
  4719.                         STRING s
  4720.                         INPUT "What do you want to do",s
  4721.                         IF     (s = "G")    THEN GOODBYE
  4722.                         ELSEIF (s = "BYE")  THEN BYE
  4723.                         ELSEIF (s = "HANG") THEN HANGUP
  4724.                         ELSE                     KBDSTUFF s
  4725.                         ENDIF
  4726.  
  4727.                    See Also
  4728.                       BYE Statement, GOODBYE Statement
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.                           
  4737.  
  4738.  
  4739.  
  4740.                   HELPPATH()   Function
  4741.  
  4742.                    Function
  4743.                       Return the path of help files as defined in PCBSetup.
  4744.  
  4745.                        Syntax
  4746.                       HELPPATH()
  4747.                                 No arguments are required
  4748.  
  4749.                        Return Type & Value
  4750.  
  4751.                       STRING      Returns the path of the PCBoard help files.
  4752.                        Remarks
  4753.  
  4754.                       This  function will return the path where help files are located
  4755.                           as defined in PCBSetup.  This can be useful when you want to add
  4756.                           system help capabilities to your PPE application.
  4757.                        Examples
  4758.  
  4759.                         PRINTLN "HELP FOR THE R (READ) COMMAND:"
  4760.                         PRINTLN "------------------------------"
  4761.                         NEWLINE
  4762.                         DISPFILE HELPPATH()+"HLPR",GRAPH+LANG+SEC
  4763.  
  4764.                    See Also
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.                           
  4773.  
  4774.  
  4775.  
  4776.                   HIGHASCII   Constant
  4777.  
  4778.                    Function
  4779.                       Set  the allow  high  ASCII flag  in  an INPUTSTR  or  PROMPTSTR
  4780.                           statement.
  4781.  
  4782.                        Value
  4783.                       4096 = 1000000000000b = 10000o = 1000h
  4784.  
  4785.                        Remarks
  4786.                       The  INPUTSTR and PROMPTSTR statements have the ability to allow
  4787.                           high  ASCII  characters to  be  input  regardless  of the  valid
  4788.                           character string specified, but  only if the SysOp  has disabled
  4789.                           the high ASCII filter in PCBSetup.
  4790.  
  4791.                        Examples
  4792.  
  4793.                         STRING pwd
  4794.                         INPUTSTR "Enter
  4795.                         password",pwd,@X0E,4,MASK_ASCII(),HIGHASCII
  4796.                         GETUSER
  4797.                         IF (pwd <> U_PWD) HANGUP
  4798.  
  4799.                    See Also
  4800.                       INPUTSTR Statement, PROMPTSTR Statement
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.                           
  4809.  
  4810.  
  4811.  
  4812.                   HOUR()   Function
  4813.  
  4814.                    Function
  4815.                       Extract the hour from a specified time of day.
  4816.  
  4817.                        Syntax
  4818.                       HOUR(texp)
  4819.                                 texp Any time expression.
  4820.  
  4821.                        Return Type & Value
  4822.  
  4823.                       INTEGER     Returns the hour from  the specified time expression
  4824.                           (texp).  Valid return values are from 0 to 23.
  4825.                        Remarks
  4826.  
  4827.                       This  function  allows you  to  extract  a  particular piece  of
  4828.                           information about  a TIME  value, in this  case the hour  of the
  4829.                           time of day expression.
  4830.                        Examples
  4831.  
  4832.                         PRINTLN "The hour is ",HOUR(TIME())
  4833.  
  4834.                    See Also
  4835.                       MIN() Function, SEC() Function
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.                           
  4844.  
  4845.  
  4846.  
  4847.                   I2S()   Function
  4848.  
  4849.                    Function
  4850.                       Convert an integer to a string in a specified number base.
  4851.  
  4852.                        Syntax
  4853.                       I2S(int,base)
  4854.                                 int  Any integer expression to convert to string format.
  4855.  
  4856.                                 base An  integer  expression  with  the  number  base  (2
  4857.                           through 36) to convert to.
  4858.  
  4859.                        Return Type & Value
  4860.                       STRING      Returns  the  int  converted  to  a  string  in  the
  4861.                           specified number base.
  4862.  
  4863.                        Remarks
  4864.                       People work  with decimal (base  10) numbers,  whereas computers
  4865.                           work with binary (base 2) numbers.  It is often more convienient
  4866.                           to display numbers in  a format other than decimal for  clarity,
  4867.                           compactness, or  other reasons.   This  function will  convert a
  4868.                           number to string  format in any number base  from 2 to 36.   So,
  4869.                           I2S(10,2)  would  return a  string of  "1010";  I2S(35,36) would
  4870.                           return "Z".  For more information on number bases, consult .
  4871.  
  4872.                        Examples
  4873.                         INTEGER i,num
  4874.                         INPUTINT "Enter a number (decimal)",num,@X0E
  4875.                         FOR i = 2 TO 36
  4876.                           PRINTLN num," base 10 = ",I2S(num,i)," base ",i
  4877.                         NEXT
  4878.  
  4879.                    See Also
  4880.  
  4881.                       S2I() Function
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.                           
  4890.  
  4891.  
  4892.  
  4893.                   IF/ELSEIF/ELSE/ENDIF   Statement
  4894.  
  4895.                    Function
  4896.                       Execute one or more statments if a condition is true.
  4897.  
  4898.                        Syntax
  4899.                       I F           ( b e x p )            s t a t e m e n t
  4900.  
  4901.                       -                    o                    r                    -
  4902.  
  4903.                           I    F   (    b    e    x    p    )   T    H    E    N
  4904.  
  4905.                               s   t   a   t   e   m   e   n   t   (   s   )
  4906.  
  4907.                       [ELSEIF  (bexp)  THEN]  '  optional  in  a  block   IF
  4908.  
  4909.                       [    s   t   a   t   e   m   e   n   t   (   s   )   ]
  4910.  
  4911.                       [ELSEIF (bexp)  THEN] ' you  may have multiple  ELSEIF
  4912.                       s   t   a   t   e   m   e   n   t   (   s   )
  4913.  
  4914.                       [    s   t   a   t   e   m   e   n   t   (   s   )   ]
  4915.  
  4916.                       [ELSE]                     '  optional in  a block  IF
  4917.  
  4918.                       [    s   t   a   t   e   m   e   n   t   (   s   )   ]
  4919.  
  4920.                       ENDIF
  4921.                                 bexp Any boolean expression.
  4922.  
  4923.                                 statement Any valid PPL statement.
  4924.  
  4925.                        Remarks
  4926.                       The IF  statement supports two types of structures:  logical and
  4927.                           block.   A logical  IF statement  is a  single  statement; if  a
  4928.                           condition is TRUE, execute a single  statement.  A block IF  can
  4929.                           be one  or more statements with multiple conditions to test for.
  4930.                           The start  of a block  IF loop is differentiated  from a logical
  4931.                           IF loop by the THEN keyword immediately after the condition.  In
  4932.                           a  block IF  statement the first  condition to evaluate  to TRUE
  4933.                           will be executed, after which control will be transferred to the
  4934.                           statement following  the ENDIF.   If none of the  conditions are
  4935.                           TRUE  by  the  time  an  ELSE  statement  is  reached  then  the
  4936.                           statements  between the  ELSE and ENDIF  will be processed.   If
  4937.                           none of the  conditions are TRUE and an  ELSE statement is never
  4938.                           found then  none of  the conditions  will be  executed; instead,
  4939.                           control will be transferred to the statement after the ENDIF.
  4940.                        Examples
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.                       
  4949.  
  4950.                         IF (CURSEC() < 10) END ' Insufficient security,
  4951.                         terminate execution
  4952.                         IF (CURSEC() < 20) THEN
  4953.                           PRINTLN "Your security is less than 20"
  4954.                         ELSEIF (CURSEC() > 30) THEN
  4955.                           PRINTLN "Your security is greater than 30"
  4956.                         ELSEIF (CURSEC() = 25) THEN
  4957.                           PRINTLN "Your security is 25"
  4958.                         ELSE
  4959.                           PRINTLN "Your security is level",CURSEC()
  4960.                         ENDIF
  4961.  
  4962.                    See Also
  4963.                       FOR/NEXT Statement, WHILE/ENDWHILE Statement
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.                           
  4972.  
  4973.  
  4974.  
  4975.                   INC   Statement
  4976.  
  4977.                    Function
  4978.                       Increment the value of a variable.
  4979.  
  4980.                        Syntax
  4981.                       INC var
  4982.                                 var  The variable with the value to increment
  4983.  
  4984.                        Remarks
  4985.  
  4986.                       Many programs require  extensive addition  and subtraction,  and
  4987.                           most often,  a  value is  increased  or decreased  by 1.    This
  4988.                           statement  allows  for  a  shorter,  more  efficient  method  of
  4989.                           increasing  (incrementing) a  value  by 1  than  adding 1  to  a
  4990.                           variable and assigning the result to the same variable.
  4991.                        Examples
  4992.  
  4993.                         INTEGER i
  4994.                         PRINTLN "Countdown:"
  4995.                         LET i = 0
  4996.                         WHILE (i <= 10) DO
  4997.                           PRINTLN "T plus ",i
  4998.                           INC i
  4999.                         ENDWHILE
  5000.  
  5001.                    See Also
  5002.                       DEC Statement
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.                           
  5011.  
  5012.  
  5013.  
  5014.                   INKEY()   Function
  5015.  
  5016.                    Function
  5017.                       Get the next key input.
  5018.  
  5019.                        Syntax
  5020.                       INKEY()
  5021.                                 No arguments are required
  5022.  
  5023.                        Return Type and Value
  5024.  
  5025.                       STRING      Returns   a   single   character   for   displayable
  5026.                           characters or a string for cursor movement and function keys.
  5027.                        Remarks
  5028.  
  5029.                       This function  will return  a single  character long  string for
  5030.                           most  key presses.   Additionally, it will return  key names for
  5031.                           function  keys  and cursor  movement  keys if  it finds  an ANSI
  5032.                           sequence  or DOORWAY mode  sequence.  It  will return keystrokes
  5033.                           from  both  the remote  caller as  well as  the local  BBS node.
  5034.                           However, realize that many function keys are reserved by PCBoard
  5035.                           for  BBS  related  uses  and  may  not  be  available  for  your
  5036.                           applications that require SysOp input.
  5037.                        Examples
  5038.  
  5039.                         STRING key
  5040.                         WHILE (key <> CHR(27)) DO
  5041.                           LET key = INKEY()
  5042.                           IF (LEFT(key,5) = "SHIFT") THEN
  5043.                             PRINTLN "It was a shifted key"
  5044.                           ELSEIF (LEFT(key,4) = "CTRL") THEN
  5045.                             PRINTLN "It was a control key"
  5046.                           ELSEIF (LEFT(key,3) = "ALT") THEN
  5047.                             PRINTLN "It was an alternate key"
  5048.                           ENDIF
  5049.                           PRINTLN "The key was ",key
  5050.                         ENDWHILE
  5051.  
  5052.                    See Also
  5053.                       KINKEY() Function, MGETBYTE() Function, MINKEY() Function
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.                           
  5062.  
  5063.  
  5064.  
  5065.                   INPUT   Statement
  5066.  
  5067.                    Function
  5068.                       Prompt the user for a string of text.
  5069.  
  5070.                        Syntax
  5071.                       INPUT prompt,var
  5072.                                 prompt    A string expression with the prompt to display
  5073.                           to the user.
  5074.  
  5075.                                 var  The variable in which to store the user's input.
  5076.  
  5077.                        Remarks
  5078.                       This statement will accept any string of input from the user, up
  5079.                           to 60  characters maximum length.  In addition to displaying the
  5080.                           prompt,  it will display  parenthesis around the  input field if
  5081.                           the user is in ANSI mode.  Because of this, you should generally
  5082.                           limit your prompts to 15 characters or less.
  5083.                        Examples
  5084.  
  5085.                         BOOLEAN b
  5086.                         DATE    d
  5087.                         INTEGER i
  5088.                         MONEY   m
  5089.                         STRING  s
  5090.                         TIME    t
  5091.                         INPUT "Enter BOOLEAN",b
  5092.                         INPUT "Enter DATE",d
  5093.                         INPUT "Enter INTEGER",i
  5094.                         INPUT "Enter MONEY",m
  5095.                         INPUT "Enter STRING",s
  5096.                         INPUT "Enter TIME",t
  5097.                         PRINTLN b," ",d," ",i
  5098.                         PRINTLN m," ",s," ",t
  5099.  
  5100.                    See Also
  5101.  
  5102.                       INPUT...  Statement, INPUTSTR  Statement,  INPUTTEXT  Statement,
  5103.                           PROMPTSTR Statement
  5104.  
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.                           
  5112.  
  5113.  
  5114.  
  5115.                   INPUT...   Statements
  5116.  
  5117.                    Function
  5118.                       Prompt the  user for a string  of text of a  specific length and
  5119.                           with type dependent valid characters.
  5120.  
  5121.                        Syntax
  5122.                       INPUT... prompt,var,color
  5123.                                 prompt    A string expression with the prompt to display
  5124.                           to the user.
  5125.  
  5126.                                 var  The variable in which to store the user's input.
  5127.                                 color     An  integer  expression  with   the  color  to
  5128.                           display the prompt in.
  5129.                           INPUT should be  followed by one of the following types (without
  5130.                           spaces between the INPUT and type):  CC, DATE, INT, MONEY, TIME,
  5131.                           or YN.
  5132.  
  5133.                        Remarks
  5134.                       This statement will accept a string of input from the user, with
  5135.                           a set  of valid characters and  up to a  maximum length (MAXLEN)
  5136.                           determined  by the statement in  use.  In addition to displaying
  5137.                           the prompt, it will  display parenthesis around the input  field
  5138.                           if  the  user is  in ANSI  mode.   Because  of this,  you should
  5139.                           generally limit  your prompts  to  a length  determined  by  the
  5140.                           following formula:  (80-MAXLEN-4).  Here are the valid character
  5141.                           masks  and  maximum   length  values  for  each  of   the  input
  5142.                           statements:
  5143.  
  5144.  
  5145.                             INPUT      CC        DATE         INT        MONEY        TIME     Y
  5146.                                                                                                N
  5147.  
  5148.                             Valid   "0123456   "01234567   "01234567   "012345678   "0123456   *
  5149.                            Chars    789"       89-/"      89+-"       9+-$."        789:"
  5150.                              Max       16          8          11           13          8       1
  5151.                            Length
  5152.  
  5153.  
  5154.  
  5155.                           * The  INPUTYN statement valid  characters are dependent  on the
  5156.                           users language selection.  Usually they will be "YN" for english
  5157.                           language systems.   Other letters may  be defined for  different
  5158.                           languages in PCBML.DAT.
  5159.                        Examples
  5160.  
  5161.  
  5162.                         DATE    d
  5163.                         INTEGER i
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.                       
  5172.  
  5173.                         MONEY   m
  5174.                         STRING  cc, yn
  5175.                         TIME    t
  5176.                         INPUTCC "Enter Credit Card Number",cc
  5177.                         INPUTDATE "Enter DATE",d
  5178.                         INPUTINT "Enter INTEGER",i
  5179.                         INPUTMONEY "Enter MONEY",m
  5180.                         INPUTTIME "Enter TIME",t
  5181.                         INPUTYN "Enter Yes/No Response",s
  5182.                         PRINTLN cc," ",d," ",i
  5183.                         PRINTLN m," ",t," ",yn
  5184.  
  5185.                    See Also
  5186.                       INPUT  Statement,   INPUTSTR  Statement,   INPUTTEXT  Statement,
  5187.                           PROMPTSTR Statement
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.                           
  5196.  
  5197.  
  5198.  
  5199.                   INPUTSTR   Statement
  5200.  
  5201.                    Function
  5202.                       Prompt the user for a string of text in a specific format.
  5203.  
  5204.                        Syntax
  5205.                       INPUTSTR prompt,var,color,len,valid,flags
  5206.                                 prompt    A string expression with the prompt to display
  5207.                           to the user.
  5208.  
  5209.                                 var  The variable in which to store the user's input.
  5210.                                 color     An  integer  expression   with  the  color  to
  5211.                           display the prompt in.
  5212.  
  5213.                                 len  An integer expression with maximum length of text to
  5214.                           input.
  5215.                                 valid     A string expression  with the valid characters
  5216.                           that the user may enter.
  5217.                                 flags     An integer expression with flags to modify how
  5218.                           the statement works.
  5219.  
  5220.                        Remarks
  5221.                       This statement will  accept a string of input from  the user, up
  5222.                           to the length defined.   The prompt parameter  will be displayed
  5223.                           to the user in the specified color before accepting input.  Only
  5224.                           characters  found  in the  valid  parameter  will  be  accepted.
  5225.                           However, the flags parameter  may affect how prompt is displayed
  5226.                           and  the valid characters  that are accepted.   Individual flags
  5227.                           may be added  together as  needed.   Several functions exist  to
  5228.                           easily specify  commonly used valid  character masks.   They are
  5229.                           MASK_ALNUM(),    MASK_ALPHA(),     MASK_ASCII(),    MASK_FILE(),
  5230.                           MASK_NUM(), MASK_PATH(),  and MASK_PWD().   Defined flag  values
  5231.                           are AUTO, DEFS, ECHODOTS, ERASELINE, FIELDLEN, GUIDE, HIGHASCII,
  5232.                           LFAFTER, LFBEFORE, NEWLINE,  NOCLEAR, STACKED, UPCASE, WORDWRAP,
  5233.                           and YESNO.
  5234.  
  5235.                        Examples
  5236.  
  5237.                         BOOLEAN b
  5238.                         DATE    d
  5239.                         INTEGER i
  5240.                         MONEY   m
  5241.                         STRING  s
  5242.                         TIME    t
  5243.                         INPUTSTR "Enter
  5244.                         BOOLEAN",b,@X0E,1,"10",LFBEFORE+NEWLINE
  5245.                         INPUTSTR "Enter DATE",d,@X0F,8,"0123456789-
  5246.                         ",NEWLINE+NOCLEAR
  5247.                         INPUTSTR "Enter
  5248.                         INTEGER",i,@X07,20,MASK_NUM(),NEWLINE
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.                       
  5257.  
  5258.                         INPUTSTR "Enter
  5259.                         MONEY",m,@X08,9,MASK_NUM()+".",NEWLINE+DEFS+FIELDLE
  5260.                         N
  5261.                         INPUTSTR "Enter
  5262.                         STRING",s,@X09,63,MASK_ASCII(),NEWLINE+FIELDLEN+GUI
  5263.                         DE
  5264.                         INPUTSTR "Enter
  5265.                         TIME",t,@X0A,5,"0123456789"+":",NEWLINE+LFAFTER
  5266.                         PRINTLN b," ",d," ",i
  5267.                         PRINTLN m," ",s," ",t
  5268.  
  5269.                    See Also
  5270.                       INPUT  Statement,   INPUT...  Statement,   INPUTTEXT  Statement,
  5271.                           PROMPTSTR Statement
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.                           
  5280.  
  5281.  
  5282.  
  5283.                   INPUTTEXT   Statement
  5284.  
  5285.                    Function
  5286.                       Prompt  the user in  a specified  color for a string  of text of
  5287.                           specified length.
  5288.  
  5289.                        Syntax
  5290.                       INPUTTEXT prompt,var,color,len
  5291.                                 prompt    A string expression with the prompt to display
  5292.                           to the user.
  5293.  
  5294.                                 var  The variable in which to store the user's input.
  5295.                                 color     An  integer  expression  with   the  color  to
  5296.                           display the prompt in.
  5297.  
  5298.                                 len  An integer expression with maximum length of text to
  5299.                           input.
  5300.                        Remarks
  5301.  
  5302.                       This statement will accept any string of input from the user, up
  5303.                           to the length defined.  In addition to displaying the prompt, it
  5304.                           will display parenthesis  around the input field  if the user is
  5305.                           in  ANSI mode.  Because of this, you should generally limit your
  5306.                           prompts to (80-len-4) characters or less.
  5307.                        Examples
  5308.  
  5309.                         BOOLEAN b
  5310.                         DATE    d
  5311.                         INTEGER i
  5312.                         MONEY   m
  5313.                         STRING  s
  5314.                         TIME    t
  5315.                         INPUTTEXT "Enter BOOLEAN",b,@X0E,1
  5316.                         INPUTTEXT "Enter DATE",d,@X0F,8
  5317.                         INPUTTEXT "Enter INTEGER",i,@X07,20
  5318.                         INPUTTEXT "Enter MONEY",m,@X08,9
  5319.                         INPUTTEXT "Enter STRING",s,@X09,63
  5320.                         INPUTTEXT "Enter TIME",t,@X0A,5
  5321.                         PRINTLN b," ",d," ",i
  5322.                         PRINTLN m," ",s," ",t
  5323.  
  5324.                    See Also
  5325.                       INPUT   Statement,  INPUT...   Statement,   INPUTSTR  Statement,
  5326.                           PROMPTSTR Statement
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.                           
  5335.  
  5336.  
  5337.  
  5338.                   INSTR()   Function
  5339.  
  5340.                    Function
  5341.                       Find the position of one string within another string.
  5342.  
  5343.                        Syntax
  5344.                       INSTR(str,sub)
  5345.                                 str  A string expression to look for sub in.
  5346.  
  5347.                                 sub  A string expression to search for.
  5348.  
  5349.                        Return Type & Value
  5350.                       INTEGER     Returns the 1-based position of sub within str  or 0
  5351.                           if sub is not found within str.
  5352.  
  5353.                        Remarks
  5354.                       This function  is useful for determining if a particular word or
  5355.                           phrase exists in a string.   The return value is the position of
  5356.                           the sub string within the longer string.  The first character of
  5357.                           str is position 1, the second is position 2, and so on.   If sub
  5358.                           is not found in str, 0 is returned.
  5359.  
  5360.                        Examples
  5361.                         STRING s
  5362.                         WHILE (INSTR(UPPER(s),"QUIT") = 0) DO
  5363.                           INPUTTEXT "Enter string",s,@X0E,40
  5364.                           NEWLINE
  5365.                           PRINTLN s
  5366.                         ENDWHILE
  5367.  
  5368.                    See Also
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.                           
  5377.  
  5378.  
  5379.  
  5380.                   INTEGER   Type
  5381.  
  5382.                    Function
  5383.                       Declare one or more variables of type integer.
  5384.  
  5385.                        Syntax
  5386.                       INTEGER var|arr(s[,s[,s]])[,var|arr(s[,s[,s]])]
  5387.                                 var  The name of a variable to  declare.  Must start with
  5388.                           a letter [A-Z] which may be followed by letters, digits [0-9] or
  5389.                           the underscore  [_].  May be of any length but only the first 32
  5390.                           characters are used.
  5391.  
  5392.                                 arr  The name of an array variable to  declare.  The same
  5393.                           naming conventions as var are used.
  5394.                                 s    The size  (0-based) of an  array variable dimension.
  5395.                           Any constant integer expression is allowed.
  5396.  
  5397.                        Remarks
  5398.                       INTEGER variables  are stored as four byte signed long integers.
  5399.                           The range of  an INTEGER is -2,147,483,648 - +2,147,483,647.  An
  5400.                           INTEGER assignment to a STRING  will result in a string with the
  5401.                           representation of  the number (similar to  BASIC's STR$ function
  5402.                           and C's  ltoa function).   A STRING  to INTEGER assignment  will
  5403.                           convert the string  back to the  four byte binary integer  value
  5404.                           (similar to  BASIC's VAL function and C's atol function).  If an
  5405.                           INTEGER is assigned  to or from  any other type, an  appropriate
  5406.                           conversion is performed automatically by PPL.
  5407.  
  5408.                        Examples
  5409.  
  5410.                         INTEGER i, year, cardDeck(4*13), matrix(2,2),
  5411.                         matrices(3,4,5)
  5412.  
  5413.                    See Also
  5414.                       BOOLEAN Type, DATE Type, MONEY Type, STRING Type, TIME Type
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.                           
  5423.  
  5424.  
  5425.  
  5426.                   JOIN   Statement
  5427.  
  5428.                    Function
  5429.                       Execute the join conference command with desired sub-commands.
  5430.  
  5431.                        Syntax
  5432.                       JOIN cmds
  5433.                                 cmds A string  expression with  any desired  sub-commands
  5434.                           for the join conference command.
  5435.  
  5436.                        Remarks
  5437.  
  5438.                       This statement will allow you to access the join conference (the
  5439.                           J  command from  the main  menu), and  any join  conference sub-
  5440.                           commands, under  PPE control.   Note  that this  statement  will
  5441.                           destroy any previously tokenized string expression.  If you have
  5442.                           string tokens pending at the time of the DIR statment you should
  5443.                           save them first  and then retokenize after the DIR  statement is
  5444.                           complete.
  5445.                        Examples
  5446.  
  5447.                         STRING yn
  5448.                         INPUTYN "Join SysOp conference",yn,@X0E
  5449.                         IF (yn = YESCHAR()) JOIN 4
  5450.  
  5451.                    See Also
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.                           
  5460.  
  5461.  
  5462.  
  5463.                   KBDCHKOFF   Statement
  5464.  
  5465.                    Function
  5466.                       Turn off keyboard timeout checking.
  5467.  
  5468.                        Syntax
  5469.                       KBDCHKOFF
  5470.                                 No arguments are required
  5471.  
  5472.                        Remarks
  5473.  
  5474.                       PCBoard has built in automatic keyboard timeout detecting.  What
  5475.                           this means is that  if someone should remain online for  a SysOp
  5476.                           defined period  of time without  typing anything for  PCBoard to
  5477.                           process, PCBoard will detect it,  log it to the callers log, and
  5478.                           recycle  back  to the  call waiting  screen.   Some applications
  5479.                           require the  ability to turn  this off; for  example, a  process
  5480.                           that  will  take a  while  without  interacting with  the caller
  5481.                           should turn  off keyboard timeout  testing to keep  PCBoard from
  5482.                           thinking   that  the  user  has  stopped  entering  information.
  5483.                           Normally,  PCBoard would just  recycle at that point.   So, just
  5484.                           before  you start a section  of code that should  continue for a
  5485.                           while  without  user  input,   you  should  issue  a   KBDCHKOFF
  5486.                           statement.   It will  turn off  the automatic  keyboard  timeout
  5487.                           checking.  When you've finished the block where keyboard timeout
  5488.                           checking has been disabled, issue the KBDCHKON statement to turn
  5489.                           it back on.
  5490.                        Examples
  5491.  
  5492.                         KBDCHKOFF
  5493.                         WHILE (RANDOM(10000) <> 0) PRINT "." ' Something to
  5494.                         take a long time!
  5495.                         KBDCHKON
  5496.  
  5497.                    See Also
  5498.                       KBDCHKON Statement
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.                           
  5507.  
  5508.  
  5509.  
  5510.                   KBDCHKON   Statement
  5511.  
  5512.                    Function
  5513.                       Turn on keyboard timeout checking.
  5514.  
  5515.                        Syntax
  5516.                       KBDCHKON
  5517.                                 No arguments are required
  5518.  
  5519.                        Remarks
  5520.  
  5521.                       PCBoard has built in automatic keyboard timeout detecting.  What
  5522.                           this means is that  if someone should remain online for  a SysOp
  5523.                           defined period  of time without  typing anything for  PCBoard to
  5524.                           process, PCBoard will detect it,  log it to the callers log, and
  5525.                           recycle  back  to the  call waiting  screen.   Some applications
  5526.                           require the  ability to turn  this off; for  example, a  process
  5527.                           that  will  take a  while  without  interacting with  the caller
  5528.                           should turn  off keyboard timeout  testing to keep  PCBoard from
  5529.                           thinking   that  the  user  has  stopped  entering  information.
  5530.                           Normally,  PCBoard would just  recycle at that point.   So, just
  5531.                           before  you start a section  of code that should  continue for a
  5532.                           while  without  user  input,   you  should  issue  a   KBDCHKOFF
  5533.                           statement.   It will  turn off  the automatic  keyboard  timeout
  5534.                           checking.  When you've finished the block where keyboard timeout
  5535.                           checking has been disabled, issue the KBDCHKON statement to turn
  5536.                           it back on.
  5537.                        Examples
  5538.  
  5539.                         KBDCHKOFF
  5540.                         WHILE (RANDOM(10000) <> 0) PRINT "." ' Something to
  5541.                         take a long time!
  5542.                         KBDCHKON
  5543.  
  5544.                    See Also
  5545.                       KBDCHKOFF Statement
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552.  
  5553.                           
  5554.  
  5555.  
  5556.  
  5557.                   KBDFILE   Statement
  5558.  
  5559.                    Function
  5560.                       Stuff the  contents of a text file into  the keyboard buffer for
  5561.                           later processing.
  5562.  
  5563.                        Syntax
  5564.                       KBDFILE file
  5565.                                 file A string expression with the filename whose contents
  5566.                           should be stuffed into the keyboard buffer.
  5567.  
  5568.                        Remarks
  5569.  
  5570.                       This  statement allows  you to  feed a  series of  keystrokes to
  5571.                           PCBoard  as though  they were  typed in  by the  user.   This is
  5572.                           useful when you need to feed a series of commands to PCBoard one
  5573.                           right  after another  and they  would add  up to  more than  256
  5574.                           characters (the maximum buffer size for the KBDSTUFF statement).
  5575.                        Examples
  5576.  
  5577.                         INTEGER retcode
  5578.                         SHOWOFF 
  5579.                         OPENCAP "NEWFILES.LST",retcode
  5580.                         KBDSTUFF CHR(13)
  5581.                         DIR "N;S;A;NS"
  5582.                         CLOSECAP
  5583.                         SHOWON
  5584.                         SHELL TRUE,retcode,"PKZIP","-mex NEWFILES
  5585.                         NEWFILES.LST"
  5586.                         KBDFILE "FLAGFILE.CMD"
  5587.  
  5588.                    See Also
  5589.                       KBDSTUFF Statement
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.                           
  5598.  
  5599.  
  5600.  
  5601.                   KBDSTUFF   Statement
  5602.  
  5603.                    Function
  5604.                       Stuff a string into the keyboard buffer for later processing.
  5605.  
  5606.                        Syntax
  5607.                       KBDSTUFF str
  5608.                                 str  A  string  expression  to  stuff  into  the keyboard
  5609.                           buffer for later processing.
  5610.  
  5611.                        Remarks
  5612.  
  5613.                       This  statement allows  you to  feed a  series of  keystrokes to
  5614.                           PCBoard as though  they were typed in by the  user.  This can be
  5615.                           especially  useful when you  are replacing  an existing command;
  5616.                           add your PPE file to the CMD.LST file so that it takes the place
  5617.                           of  the built in command, then have  your PPE stuff the original
  5618.                           (or modified command) back to the keyboard buffer.  PCBoard will
  5619.                           then process it as  soon as you exit  your PPE application.   It
  5620.                           can  also be used when building new commands that should perform
  5621.                           several  built in  operations automatically.   A maximum  of 256
  5622.                           characters  at a time  can be stuffed into  the keyboard buffer.
  5623.                           If  you  need  more  than  this,  you  should  use  the  KBDFILE
  5624.                           statement.
  5625.                        Examples
  5626.  
  5627.                         INTEGER retcode
  5628.                         SHOWOFF 
  5629.                         OPENCAP "NEWFILES.LST",retcode
  5630.                         KBDSTUFF CHR(13)
  5631.                         DIR "N;S;A;NS"
  5632.                         CLOSECAP
  5633.                         SHOWON
  5634.                         SHELL TRUE,retcode,"PKZIP","-mex NEWFILES
  5635.                         NEWFILES.LST"
  5636.                         KBDSTUFF "FLAG NEWFILES.ZIP"
  5637.  
  5638.                    See Also
  5639.                       KBDFILE Statement
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.                           
  5648.  
  5649.  
  5650.  
  5651.                   KINKEY()   Function
  5652.  
  5653.                    Function
  5654.                       Get the next key input from the local keyboard only.
  5655.  
  5656.                        Syntax
  5657.                       KINKEY()
  5658.                                 No arguments are required
  5659.  
  5660.                        Return Type and Value
  5661.  
  5662.                       STRING      Returns   a   single   character   for   displayable
  5663.                           characters or a string for cursor movement and function keys.
  5664.                        Remarks
  5665.  
  5666.                       This function  will return  a single  character long  string for
  5667.                           most  key presses.   Additionally, it will return  key names for
  5668.                           function keys  and cursor movement  keys.  It  will only  return
  5669.                           keystrokes from the local BBS node's keyboard.  However, realize
  5670.                           that  many function keys are reserved by PCBoard for BBS related
  5671.                           uses and may not be available for your applications that require
  5672.                           SysOp input.
  5673.                        Examples
  5674.  
  5675.                         STRING key
  5676.                         WHILE (key <> CHR(27)) DO
  5677.                           LET key = KINKEY()
  5678.                           IF (LEFT(key,5) = "SHIFT") THEN
  5679.                             PRINTLN "It was a shifted key"
  5680.                           ELSEIF (LEFT(key,4) = "CTRL") THEN
  5681.                             PRINTLN "It was a control key"
  5682.                           ELSEIF (LEFT(key,3) = "ALT") THEN
  5683.                             PRINTLN "It was an alternate key"
  5684.                           ENDIF
  5685.                           PRINTLN "The key was ",key
  5686.                         ENDWHILE
  5687.  
  5688.                    See Also
  5689.                       INKEY() Function, MGETBYTE() Function, MINKEY() Function
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.                           
  5698.  
  5699.  
  5700.  
  5701.                   LANG   Constant
  5702.  
  5703.                    Function
  5704.                       Set  the language  specific  file  search  flag  in  a  DISPFILE
  5705.                           statement.
  5706.  
  5707.                        Value
  5708.                       4 = 100b = 4o = 4h
  5709.  
  5710.                        Remarks
  5711.                       The DISPFILE statement will  allow you to display a  file to the
  5712.                           user,  and  optionally  to  have  PCBoard  look  for   alternate
  5713.                           security, graphics,  and/or language specific files.   This flag
  5714.                           instructs PCBoard to search for alternate language files via the
  5715.                           language  extension.   The  current  language  extension may  be
  5716.                           obtained with the LANGEXT() function.
  5717.  
  5718.                        Examples
  5719.  
  5720.                         STRING s
  5721.                         DISPFILE "MNUA",SEC+GRAPH+LANG
  5722.                         INPUT "Option",s
  5723.  
  5724.                    See Also
  5725.                       DISPFILE  Statement,  GRAPH  Constant,  LANGEXT()  Function, SEC
  5726.                           Constant
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.                           
  5735.  
  5736.  
  5737.  
  5738.                   LANGEXT()   Function
  5739.  
  5740.                    Function
  5741.                       Get the file extension for the current language.
  5742.  
  5743.                        Syntax
  5744.                       LANGEXT()
  5745.                                 No arguments are required
  5746.  
  5747.                        Return Type and Value
  5748.  
  5749.                       STRING      Returns a ".XXX"  formatted string where XXX  is the
  5750.                           extension text (could  be 1, 2 or 3 characters long depending on
  5751.                           the configuration and language in use).
  5752.                        Remarks
  5753.  
  5754.                       This  function allows you  to access the file  extension used by
  5755.                           SysOp definable and system language specific files.  You may use
  5756.                           it to create your own filenames that are language specific.
  5757.                        Examples
  5758.  
  5759.                         PRINTLN "Brief user profile"
  5760.                         NEWLINE
  5761.                         PRINTLN "     Security:  ",CURSEC()
  5762.                         PRINTLN "Graphics Mode:  ",GRAFMODE()
  5763.                         PRINTLN "     Language:  ",LANGEXT()
  5764.  
  5765.                    See Also
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.                           
  5774.  
  5775.  
  5776.  
  5777.                   LEFT()   Function
  5778.  
  5779.                    Function
  5780.                       Access the left most characters from a string.
  5781.  
  5782.                        Syntax
  5783.                       LEFT(str,chars)
  5784.                                 str  A string expression to take the left most characters
  5785.                           of.
  5786.  
  5787.                                 chars     An  integer  expression  with  the  number  of
  5788.                           characters to take from the left end of str.
  5789.  
  5790.                        Return Type & Value
  5791.                       STRING      Returns a string with the left most chars characters
  5792.                           of str.
  5793.  
  5794.                        Remarks
  5795.                       This function  will return a sub string with the left most chars
  5796.                           characters of  a specified string.   This can be  useful in data
  5797.                           processing as well as text formatting.  If chars is less than or
  5798.                           equal to 0 then the returned string will be empty.   If chars is
  5799.                           greater  than the  length of str  then the returned  string will
  5800.                           have spaces added to the  left to pad it out to  the full length
  5801.                           specified.
  5802.  
  5803.                        Examples
  5804.                         WHILE (RANDOM(250) <> 0) PRINT
  5805.                         LEFT(RANDOM(250),4)," "
  5806.  
  5807.                         STRING s
  5808.                         FOPEN 1,"DATA.TXT",O_RD,S_DN
  5809.                         WHILE (!FERR(1)) DO
  5810.                           FGET 1,s
  5811.                           PRINT RTRIM(LEFT(s,25)," ")," - "
  5812.                           PRINTLN RIGHT(s,LEN(s)-25)
  5813.                         ENDWHILE
  5814.                         FCLOSE 1
  5815.  
  5816.                    See Also
  5817.  
  5818.                       MID() Function, RIGHT() Function
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.                           
  5827.  
  5828.  
  5829.  
  5830.                   LEN()   Function
  5831.  
  5832.                    Function
  5833.                       Access the length of a string.
  5834.  
  5835.                        Syntax
  5836.                       LEN(str)
  5837.                                 str  Any string expression.
  5838.  
  5839.                        Return Type & Value
  5840.  
  5841.                       INTEGER     Returns the length of a string.
  5842.                        Remarks
  5843.  
  5844.                       This function  will return the  length of a  string.   The value
  5845.                           returned will always be between 0 (an empty string) and 256 (the
  5846.                           maximum length of a string).
  5847.                        Examples
  5848.  
  5849.                         STRING s
  5850.                         FOPEN 1,"DATA.TXT",O_RD,S_DN
  5851.                         WHILE (!FERR(1)) DO
  5852.                           FGET 1,s
  5853.                           PRINTLN "The length of the current string is
  5854.                         ",LEN(s)
  5855.                         ENDWHILE
  5856.                         FCLOSE 1
  5857.  
  5858.                    See Also
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.                           
  5867.  
  5868.  
  5869.  
  5870.                   LET   Statement
  5871.  
  5872.                    Function
  5873.                       Evaluate an expression and assign the result to a variable.
  5874.  
  5875.                        Syntax
  5876.                       L    E    T     v    a    r     =     e    x    p    r
  5877.  
  5878.                           -                    o                    r                    -
  5879.  
  5880.                           var = expr
  5881.                                 var  Variable  to which  the  result  of expr  should  be
  5882.                           assigned.
  5883.  
  5884.                                 expr Any valid PPL expression.
  5885.  
  5886.                        Remarks
  5887.                       The  LET statement  supports modes  of operation:   explicit and
  5888.                           implicit.   An explicit LET statement always includes all of the
  5889.                           parts in the first example above (the LET keyword, the variable,
  5890.                           the equal  sign, and the expression).  An implicit LET statement
  5891.                           does  not need  the  LET keyword;  the  format (var  = expr)  is
  5892.                           sufficient.  However,  the implicit form  will not always  work.
  5893.                           For example,  if you had a variable named PRINT (which is also a
  5894.                           statement name) you could not use PRINT =  expr; PPL expects the
  5895.                           first word on a line to be a statement name, and if it isn't, it
  5896.                           is an  implicit LET statement.   Since PPL would  find the PRINT
  5897.                           statement first it would try to process the rest of  the line as
  5898.                           a PRINT  statement.   This is  easily avoided  by using  the LET
  5899.                           keyword  and making  it an explicit  LET statement (LET  PRINT =
  5900.                           expr).
  5901.                        Examples
  5902.  
  5903.                         INTEGER i
  5904.                         STRING  s
  5905.                         GETUSER
  5906.                         LET U_PWD = "NEWPWD"
  5907.                         LET s = "This is a string"
  5908.                         LET i = 7*9+9*7
  5909.                         PUTUSER
  5910.  
  5911.                    See Also
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.                           
  5920.  
  5921.  
  5922.  
  5923.                   LFAFTER   Constant
  5924.  
  5925.                    Function
  5926.                       Set  the  extra  line  feed after  prompt  flag  in a  DISPTEXT,
  5927.                           INPUTSTR, or PROMPTSTR statement.
  5928.  
  5929.                        Value
  5930.                       256 = 100000000b = 400o = 100h
  5931.  
  5932.                        Remarks
  5933.                       The  INPUTSTR,  PROMPTSTR,  and  DISPTEXT  statements  have  the
  5934.                           ability  to send  an  extra carriage  return/line  feed  after a
  5935.                           prompt is displayed automatically and without the need to make a
  5936.                           separate call to the NEWLINE statement.
  5937.  
  5938.                        Examples
  5939.  
  5940.                         STRING pwd
  5941.                         INPUTSTR "Enter
  5942.                         id",pwd,@X0E,4,"0123456789",LFBEFORE+NEWLINE+LFAFTE
  5943.                         R
  5944.                         IF (pwd <> "1234") PRINTLN "Bad id number"
  5945.  
  5946.                    See Also
  5947.                       DISPTEXT  Statement,  INPUTSTR  Statement,  LFBEFORE   Constant,
  5948.                           NEWLINE Constant, PROMPTSTR Statement
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.                           
  5957.  
  5958.  
  5959.  
  5960.                   LFBEFORE   Constant
  5961.  
  5962.                    Function
  5963.                       Set the line feed before prompt flag in a DISPTEXT, INPUTSTR, or
  5964.                           PROMPTSTR statement.
  5965.  
  5966.                        Value
  5967.                       128 = 10000000b = 200o = 80h
  5968.  
  5969.                        Remarks
  5970.                       The  INPUTSTR,  PROMPTSTR,  and  DISPTEXT  statements  have  the
  5971.                           ability to send  a carriage return/line feed before a  prompt is
  5972.                           displayed automatically and without the  need to make a separate
  5973.                           call to the NEWLINE statement.
  5974.  
  5975.                        Examples
  5976.  
  5977.                         STRING pwd
  5978.                         INPUTSTR "Enter
  5979.                         id",pwd,@X0E,4,"0123456789",LFBEFORE+NEWLINE+LFAFTE
  5980.                         R
  5981.                         IF (pwd <> "1234") PRINTLN "Bad id"
  5982.  
  5983.                    See Also
  5984.                       DISPTEXT   Statement,  INPUTSTR  Statement,   LFAFTER  Constant,
  5985.                           NEWLINE Constant, PROMPTSTR Statement
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.                           
  5994.  
  5995.  
  5996.  
  5997.                   LOG   Statement
  5998.  
  5999.                    Function
  6000.                       Log a message to the callers log.
  6001.  
  6002.                        Syntax
  6003.                       LOG msg,left
  6004.                                 msg  A string expression to write to the callers log.
  6005.  
  6006.                                 left A boolean expression with  value TRUE if msg  should
  6007.                           be left justified, FALSE if msg should be indented six spaces.
  6008.  
  6009.                        Remarks
  6010.                       There  are  two primary  uses  for this  statement.   First  and
  6011.                           foremost, it  allows you to keep the SysOp  informed of what the
  6012.                           user does  while using your  PPL application.  Secondly,  it can
  6013.                           allow you to track information within your PPE while debugging.
  6014.                        Examples
  6015.  
  6016.                         BOOLEAN flag
  6017.                         PRINT "Type QUIT to exit..."
  6018.                         WAITFOR "QUIT",flag,60
  6019.                         IF (!flag) LOG "User did not type QUIT",FALSE
  6020.                         LOG "***EXITING PPE***",TRUE
  6021.  
  6022.                    See Also
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.  
  6030.                           
  6031.  
  6032.  
  6033.  
  6034.                   LOGGEDON()   Function
  6035.  
  6036.                    Function
  6037.                       Determine if a user has completely logged on to the BBS.
  6038.  
  6039.                        Syntax
  6040.                       LOGGEDON()
  6041.                                 No arguments are required
  6042.  
  6043.                        Return Type and Value
  6044.  
  6045.                       BOOLEAN     Returns TRUE if  the user has completed  logging in,
  6046.                           FALSE otherwise.
  6047.                        Remarks
  6048.  
  6049.                       There are  some features of PPL that are not available until the
  6050.                           user  has completely logged  in, such as the  user variables and
  6051.                           functions and the CALLNUM() function.  This  function will allow
  6052.                           you to detect whether or not a user has completely logged in and
  6053.                           if selected PPL features are available.
  6054.                        Examples
  6055.  
  6056.                         IF (!LOGGEDON()) LOG "USER NOT LOGGED ON",0
  6057.  
  6058.                    See Also
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.                           
  6067.  
  6068.  
  6069.  
  6070.                   LOGIT   Constant
  6071.  
  6072.                    Function
  6073.                       Set  the  write  prompt  to  callers  log  flag  in  a  DISPTEXT
  6074.                           statement.
  6075.  
  6076.                        Value
  6077.                       32768 = 1000000000000000b = 100000o = 8000h
  6078.  
  6079.                        Remarks
  6080.                       The DISPTEXT  statement has  the  ability to  write a  specified
  6081.                           prompt  to the callers log automatically without the need to use
  6082.                           the LOG statement.  This flag will indent the prompt  six spaces
  6083.                           in the callers log.
  6084.  
  6085.                        Examples
  6086.  
  6087.                         DISPTEXT 4,LFBEFORE+LFAFTER+BELL+LOGIT
  6088.  
  6089.                    See Also
  6090.                       DISPTEXT Statement, LOGITLEFT Constant
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.                           
  6099.  
  6100.  
  6101.  
  6102.                   LOGITLEFT   Constant
  6103.  
  6104.                    Function
  6105.                       Set  the write prompt  to callers log  left justified  flag in a
  6106.                           DISPTEXT statement.
  6107.  
  6108.                        Value
  6109.                       65536 = 10000000000000000b = 200000o = 10000h
  6110.  
  6111.                        Remarks
  6112.                       The DISPTEXT  statement has  the  ability to  write a  specified
  6113.                           prompt  to the callers log automatically without the need to use
  6114.                           the LOG statement.  This flag will not indent  the prompt in the
  6115.                           callers log.
  6116.  
  6117.                        Examples
  6118.  
  6119.                         DISPTEXT 4,LFBEFORE+LFAFTER+BELL+LOGITLEFT
  6120.  
  6121.                    See Also
  6122.                       DISPTEXT Statement, LOGIT Constant
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.                           
  6131.  
  6132.  
  6133.  
  6134.                   LOWER()   Function
  6135.  
  6136.                    Function
  6137.                       Converts uppercase characters in a string to lowercase.
  6138.  
  6139.                        Syntax
  6140.                       LOWER(sexp)
  6141.                                 sexp Any string expression.
  6142.  
  6143.                        Return Type & Value
  6144.  
  6145.                       STRING      Returns sexp with all uppercase characters converted
  6146.                           to lowercase.
  6147.                        Remarks
  6148.  
  6149.                       Although  "STRING" is  technically different from  "string" (ie,
  6150.                           the computer doesn't  recognize them as  being the same  because
  6151.                           one  is uppercase  and  the other  is  lowercase), it  is  often
  6152.                           necessary  to save,  display  or compare  information in  a case
  6153.                           insensitive format.  This function will return a string with all
  6154.                           uppercase characters  converted  to lowercase.   So,  using  the
  6155.                           above example, LOWER("STRING") would return "string".
  6156.                        Examples
  6157.  
  6158.                         STRING s
  6159.                         WHILE (UPPER(s) <> "QUIT") DO
  6160.                           INPUT "Text",s
  6161.                           PRINTLN LOWER(s)
  6162.                         ENDWHILE
  6163.  
  6164.                    See Also
  6165.                       UPPER() Function
  6166.  
  6167.  
  6168.  
  6169.  
  6170.  
  6171.  
  6172.  
  6173.                           
  6174.  
  6175.  
  6176.  
  6177.                   LTRIM()   Function
  6178.  
  6179.                    Function
  6180.                       Trim a specified character from the left end of a string.
  6181.  
  6182.                        Syntax
  6183.                       LTRIM(str,ch)
  6184.                                 str  Any string expression.
  6185.  
  6186.                                 ch   A string with the character  to strip from the  left
  6187.                           end of str.
  6188.  
  6189.                        Return Type & Value
  6190.                       STRING      Returns the trimmed str.
  6191.  
  6192.                        Remarks
  6193.                       A common need in programming is to strip leading and/or trailing
  6194.                           spaces (or  other  characters).   This  function  will  strip  a
  6195.                           specified character from the left end of a string and return the
  6196.                           trimmed string.
  6197.  
  6198.                        Examples
  6199.                         STRING s
  6200.                         LET s = "   TEST   "
  6201.                         PRINTLN LTRIM(s," ") ' Will print "TEST   "
  6202.                         PRINTLN LTRIM(".....DA"+"TA.....",".") ' Will print
  6203.                         "DATA....."
  6204.                         PRINTLN LTRIM(".....DA"+"TA....."," ") ' Will print
  6205.                         ".....DATA....."
  6206.  
  6207.                    See Also
  6208.  
  6209.                       RTRIM() Function, TRIM() Function
  6210.  
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.  
  6217.                           
  6218.  
  6219.  
  6220.  
  6221.                   MASK_...()   Functions
  6222.  
  6223.                    Function
  6224.                       Return a string for use as a valid character mask.
  6225.  
  6226.                        Syntax
  6227.                       MASK_...()
  6228.                                 No arguments are required
  6229.  
  6230.                           MASK_ should  be followed by  one of the  following mask  types:
  6231.                           ALNUM, ALPHA, ASCII, FILE, NUM, PATH, or PWD.
  6232.                        Return Type and Value
  6233.  
  6234.                       STRING      Returns a string with a set  of characters to use as
  6235.                           valid input for an INPUTSTR or PROMPTSTR statement.
  6236.                        Remarks
  6237.  
  6238.                       There are  many situations  in which  you will  need  to use  an
  6239.                           INPUTSTR or PROMPTSTR statement to access the input field length
  6240.                           of  flags.   However, all you  need to  use a  'standard' set of
  6241.                           input  characters.  These functions provide you with some of the
  6242.                           most  common valid  character masks.   They  are:   MASK_ALNUM()
  6243.                           which returns A-Z, a-z, and 0-9; MASK_ALPHA() which  returns A-Z
  6244.                           and a-z; MASK_ASCII()  which returns all  characters from  space
  6245.                           (ASCII 32) to  tilde (ASCII 126); MASK_FILE()  which returns all
  6246.                           legal  file  name  characters;  MASK_NUM()  which  returns  0-9;
  6247.                           MASK_PATH() which  returns all legal path  name characters; and,
  6248.                           finally, MASK_PWD() which returns a set of valid characters  for
  6249.                           use in passwords.
  6250.                        Examples
  6251.  
  6252.                         INTEGER i
  6253.                         STRING  s
  6254.                         INPUTSTR "Enter a number from 0 to
  6255.                         1000",i,@X0E,4,MASK_NUM(),DEFS
  6256.                         PROMPTSTR 148,s,12,MASK_PWD(),ECHODOTS
  6257.                         INPUTSTR "Enter your
  6258.                         comment",s,@X0E,60,MASK_ASCII(),DEFS
  6259.  
  6260.                    See Also
  6261.                       INPUTSTR Statement, PROMPTSTR Statement
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.                           
  6270.  
  6271.  
  6272.  
  6273.                   MAXNODE()   Function
  6274.  
  6275.                    Function
  6276.                       Determine how many nodes a system may have.
  6277.  
  6278.                        Syntax
  6279.                       MAXNODE()
  6280.                                 No arguments are required
  6281.  
  6282.                        Return Type and Value
  6283.  
  6284.                       INTEGER     Returns  the  node  limit  available  to the  system
  6285.                           running the PPE file.
  6286.                        Remarks
  6287.  
  6288.                       Every  package  of  PCBoard  purchased  comes  with  a   license
  6289.                           agreement that  limits it  to a maximum  number of nodes.   This
  6290.                           node limit  restricts various features  of PCBoard, such  as the
  6291.                           WHO display and CHAT functions.  This limit is available to your
  6292.                           PPL applications via this function.
  6293.                        Examples
  6294.  
  6295.                         INTEGER i
  6296.                         FOR i = 1 TO MAXNODE()
  6297.                           RDUNET i
  6298.                           IF ((UN_STAT() = "A") | (UN_STAT() = "U")) THEN
  6299.                             BROADCAST i,i,"Hello, how are you?"
  6300.                             IF (PCBNODE() = i) PRINLN "Quit talking to
  6301.                         yourself"
  6302.                           ENDIF
  6303.                         NEXT
  6304.  
  6305.                    See Also
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.                           
  6314.  
  6315.  
  6316.  
  6317.                   MESSAGE   Statement
  6318.  
  6319.                    Function
  6320.                       Enter a message under PPL control.
  6321.  
  6322.                        Syntax
  6323.                       MESSAGE conf,to,from,sub,sec,pack,rr,echo,file
  6324.                                 conf An integer expression with  the conference in  which
  6325.                           to post the message.
  6326.  
  6327.                                 to   A string expression with the user name to  which the
  6328.                           message should be sent.
  6329.                                 from A string  expression with  the  user name  that  the
  6330.                           message should be sent from.
  6331.  
  6332.                                 sub  A string expression with the subject of the message.
  6333.                                 sec  A string  expression with  the desired  security for
  6334.                           the message ("N"for none or "R" for receiver only).
  6335.                                 pack A  date  expression with  the  packout date  for the
  6336.                           message (or 0 for no packout date).
  6337.  
  6338.                                 rr   A  boolean   expression  with  the   return  receipt
  6339.                           requested   flag  (TRUE  to  request  a  return  receipt,  FALSE
  6340.                           otherwise).
  6341.                                 echo A  boolean expression  with the  echo flag  (TRUE to
  6342.                           echo the message, FALSE otherwise).
  6343.                                 file A  string expression with the  path and file name of
  6344.                           the text file to use as the message text.
  6345.  
  6346.                        Remarks
  6347.                       This statement will allow you  to leave a message from  any user
  6348.                           (or  any 'name' you  wish to  use) to  any user on  your system.
  6349.                           This  can be useful if you want  to notify a user of information
  6350.                           that  they should download  in a QWK  packet or that  they might
  6351.                           miss too easily as a quick one liner on screen from the PPL.
  6352.  
  6353.                        Examples
  6354.  
  6355.                         IF (CURSEC() < 20) THEN
  6356.                           MESSAGE
  6357.                         0,U_NAME(),"SYSOP","REGISTER","R",DATE(),TRUE,FALSE
  6358.                         ,"REG.TXT"
  6359.                         ENDIF
  6360.  
  6361.                    See Also
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.                           
  6370.  
  6371.  
  6372.  
  6373.                   MGETBYTE()   Function
  6374.  
  6375.                    Function
  6376.                       Get the next byte input from the modem.
  6377.  
  6378.                        Syntax
  6379.                       MGETBYTE()
  6380.                                 No arguments are required
  6381.  
  6382.                        Return Type and Value
  6383.  
  6384.                       INTEGER     Returns the value (0-255) of the next  byte from the
  6385.                           modem input buffer or -1 if no bytes are pending.
  6386.                        Remarks
  6387.  
  6388.                       Any  character may be  received from the users  modem.  Normally
  6389.                           PCBoard  will  filter and  convert  strings  (ESC sequences  and
  6390.                           DOORWAY  codes) automatically.    However, sometimes  this isn't
  6391.                           desired  and you  need  to access  the incoming  bytes directly.
  6392.                           This function will  look directly for  incoming characters  from
  6393.                           the modem  and return  them as  a value from  0 to  255.   These
  6394.                           numbers may be converted to  characters with the CHR()  function
  6395.                           if necessary.
  6396.                        Examples
  6397.  
  6398.                         INTEGER byte
  6399.                         WHILE (byte <> 27) DO
  6400.                           LET byte = MGETBYTE()
  6401.                           PRINTLN "The byte value is ",byte
  6402.                         ENDWHILE
  6403.  
  6404.                    See Also
  6405.                       INKEY() Function, KINKEY() Function, MINKEY() Function
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.                           
  6414.  
  6415.  
  6416.  
  6417.                   MID()   Function
  6418.  
  6419.                    Function
  6420.                       Access any sub string of a string.
  6421.  
  6422.                        Syntax
  6423.                       MID(str,pos,chars)
  6424.                                 str  A string expression to take the left most characters
  6425.                           of.
  6426.  
  6427.                                 pos  An integer  expression with the position  within str
  6428.                           to start taking the sub string from.
  6429.                                 chars     An  integer  expression  with  the  number  of
  6430.                           characters to take from str.
  6431.  
  6432.                        Return Type & Value
  6433.                       STRING      Returns  a  string  with  the  specified  number  of
  6434.                           characters from the specified position of str.
  6435.  
  6436.                        Remarks
  6437.                       This function will return a sub string with the specified number
  6438.                           of characters  and from the specified position of str.  This can
  6439.                           be useful  in data processing as  well as text  formatting.  The
  6440.                           pos parameter may  be less than 1 (the beginning of the str) and
  6441.                           greater than  the length  of str; if it  is then spaces  will be
  6442.                           added  to the beginning  and/or ending as  needed.   If chars is
  6443.                           less than or  equal to 0 then the returned string will be empty.
  6444.                           If chars is greater  than the available  length of str then  the
  6445.                           returned string will  have spaces added to the  end(s) to pad it
  6446.                           out to the full length specified.
  6447.  
  6448.                        Examples
  6449.  
  6450.                         WHILE (RANDOM(250) <> 0) PRINT
  6451.                         MID(RANDOM(250),0,4)," "
  6452.  
  6453.                         STRING s
  6454.                         FOPEN 1,"DATA.TXT",O_RD,S_DN
  6455.                         WHILE (!FERR(1)) DO
  6456.                           FGET 1,s
  6457.                           PRINT LEFT(s,5),RTRIM(MID(s,5,20)," ")," - "
  6458.                           PRINTLN RTRIM(MID(s,LEN(s)-25,60)," ")
  6459.                         ENDWHILE
  6460.                         FCLOSE 1
  6461.  
  6462.                    See Also
  6463.                       LEFT() Function, RIGHT() Function
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.                           
  6472.  
  6473.  
  6474.  
  6475.                   MIN()   Function
  6476.  
  6477.                    Function
  6478.                       Extract the minute of the hour from a specified time of day.
  6479.  
  6480.                        Syntax
  6481.                       MIN(texp)
  6482.                                 texp Any time expression.
  6483.  
  6484.                        Return Type & Value
  6485.  
  6486.                       INTEGER     Returns  the minute of  the hour from  the specified
  6487.                           time expression (texp).  Valid return values are from 0 to 59.
  6488.                        Remarks
  6489.  
  6490.                       This  function  allows you  to  extract  a  particular piece  of
  6491.                           information about a  TIME value, in this case  the minute of the
  6492.                           hour of the time of day expression.
  6493.                        Examples
  6494.  
  6495.                         PRINTLN "The minute is ",MIN(TIME())
  6496.  
  6497.                    See Also
  6498.                       HOUR() Function, SEC() Function
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.                           
  6507.  
  6508.  
  6509.  
  6510.                   MINKEY()   Function
  6511.  
  6512.                    Function
  6513.                       Get the next key input from the modem only.
  6514.  
  6515.                        Syntax
  6516.                       MINKEY()
  6517.                                 No arguments are required
  6518.  
  6519.                        Return Type and Value
  6520.  
  6521.                       STRING      Returns   a   single   character   for   displayable
  6522.                           characters or a string for cursor movement and function keys.
  6523.                        Remarks
  6524.  
  6525.                       This function  will return  a single  character long  string for
  6526.                           most  key presses.   Additionally, it will return  key names for
  6527.                           function  keys  and cursor  movement keys  if it  encounters ESC
  6528.                           sequences or DOORWAY codes.  It will only return keystrokes from
  6529.                           the remote users modem.
  6530.                        Examples
  6531.  
  6532.                         STRING key
  6533.                         WHILE (key <> CHR(27)) DO
  6534.                           LET key = MINKEY()
  6535.                           IF (LEFT(key,5) = "SHIFT") THEN
  6536.                             PRINTLN "It was a shifted key"
  6537.                           ELSEIF (LEFT(key,4) = "CTRL") THEN
  6538.                             PRINTLN "It was a control key"
  6539.                           ELSEIF (LEFT(key,3) = "ALT") THEN
  6540.                             PRINTLN "It was an alternate key"
  6541.                           ENDIF
  6542.                           PRINTLN "The key was ",key
  6543.                         ENDWHILE
  6544.  
  6545.                    See Also
  6546.                       INKEY() Function, KINKEY() Function, MGETBYTE() Function
  6547.  
  6548.  
  6549.  
  6550.  
  6551.  
  6552.  
  6553.  
  6554.                           
  6555.  
  6556.  
  6557.  
  6558.                   MINLEFT()   Function
  6559.  
  6560.                    Function
  6561.                       Return the users minutes left.
  6562.  
  6563.                        Syntax
  6564.                       MINLEFT()
  6565.                                 No arguments are required
  6566.  
  6567.                        Return Type and Value
  6568.  
  6569.                       INTEGER     Returns  the number of  minutes the user  online has
  6570.                           left to use.
  6571.                        Remarks
  6572.  
  6573.                       This function will  allow you to  access how much time  the user
  6574.                           has remaining.  You could  use it to disable certain features at
  6575.                           a certain point in their  session.  Note that this number can be
  6576.                           either the minutes left today or this session  if the SysOp does
  6577.                           not enforce daily time limits.
  6578.                        Examples
  6579.  
  6580.                         IF (MINLEFT() > 10) THEN
  6581.                           KBDSTUFF "D"+CHR(13)
  6582.                         ELSE
  6583.                           PRINTLN "Sorry, not enough time left to download"
  6584.                         ENDIF
  6585.  
  6586.                    See Also
  6587.                       MINON() Function
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.                           
  6596.  
  6597.  
  6598.  
  6599.                   MINON()   Function
  6600.  
  6601.                    Function
  6602.                       Return the users minutes online.
  6603.  
  6604.                        Syntax
  6605.                       MINON()
  6606.                                 No arguments are required
  6607.  
  6608.                        Return Type and Value
  6609.  
  6610.                       INTEGER     Returns  the number of  minutes the user  online has
  6611.                           used this session.
  6612.                        Remarks
  6613.  
  6614.                       This function will  allow you to  access how much time  the user
  6615.                           has used  this session.  You  could use it to  allow or disallow
  6616.                           certain  features before a certain point in their session.  Note
  6617.                           that  this number will  always be the minutes  used this session
  6618.                           regardless  of  whether or  not  the  SysOp enforces  daily time
  6619.                           limits.
  6620.                        Examples
  6621.  
  6622.                         IF (MINON() >= 10) THEN
  6623.                           KBDSTUFF "D"+CHR(13)
  6624.                         ELSE
  6625.                           PRINTLN "Sorry, you haven't been on long enough
  6626.                         yet to download"
  6627.                         ENDIF
  6628.  
  6629.                    See Also
  6630.                       MINLEFT() Function
  6631.  
  6632.  
  6633.  
  6634.  
  6635.  
  6636.  
  6637.  
  6638.                           
  6639.  
  6640.  
  6641.  
  6642.                   MKADDR()   Function
  6643.  
  6644.                    Function
  6645.                       Create a complete address from a segment and offset.
  6646.  
  6647.                        Syntax
  6648.                       MKADDR(seg,off)
  6649.                                 seg  An  integer expression with  the segment  portion of
  6650.                           the address.
  6651.  
  6652.                                 off  An integer expression with the offset portion of the
  6653.                           address.
  6654.  
  6655.                        Return Type & Value
  6656.                       INTEGER     Returns an integer with the  complete segment:offset
  6657.                           based address.
  6658.  
  6659.                        Remarks
  6660.                       The  POKE... statements  and  PEEK...() functions  require  full
  6661.                           addresses to read  from and write to memory.   Normally you will
  6662.                           know the segment and the offset portions of the address but they
  6663.                           will be separate.  Although not difficult to integrate together,
  6664.                           this function automates the process.  The values returned can be
  6665.                           calculated by the following formula:  seg*10000h+off.
  6666.  
  6667.                        Examples
  6668.                         PRINTLN "Ticks since
  6669.                         midnight",PEEKDW(MKADDR(0040h,006Ch))
  6670.  
  6671.                    See Also
  6672.  
  6673.                       VARADDR Statement, VAROFF Statement, VARSEG Statement
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.                           
  6682.  
  6683.  
  6684.  
  6685.                   MKDATE()   Function
  6686.  
  6687.                    Function
  6688.                       Create a complete date from separate year, month and day values.
  6689.  
  6690.                        Syntax
  6691.                       MKDATE(year,month,day)
  6692.                                 year An  integer expression with  the year  (1900 through
  6693.                           2079).
  6694.  
  6695.                                 month     An   integer  expression  with  the  month  (1
  6696.                           through 12).
  6697.                                 day  An  integer expression with the  day of the month (1
  6698.                           through 31).
  6699.  
  6700.                        Return Type & Value
  6701.                       DATE  Returns a date made from the specified year, month and day
  6702.                           values.
  6703.  
  6704.                        Remarks
  6705.                       Although PPL does it's best to automatically convert values from
  6706.                           one type to  another as needed, converting STRING values to DATE
  6707.                           values presents a special problem because of the year portion of
  6708.                           the date.  Normally  the year is only  expressed in a two  digit
  6709.                           format.  This  limits the automatic  convertion to a single  100
  6710.                           year period.  PCBoard uses year values greater than or  equal to
  6711.                           80 as 20th century (19XX) dates, and year values less than 80 as
  6712.                           21st  century (20XX) dates.  Since  you may need to access dates
  6713.                           prior  to 1980 (when  processing birthdates,  for example), this
  6714.                           function allows you to take three integers (year, month and day)
  6715.                           and build any date necessary.
  6716.  
  6717.                        Examples
  6718.  
  6719.                         PRINTLN "My birthdate is ",MKDATE(1967,10,31)
  6720.                         INTEGER y,m,d
  6721.                         INPUTINT " Your birth year",y,@X0E
  6722.                         INPUTINT "Your birth month",m,@X0E
  6723.                         INPUTINT "  Your birth day",d,@X0E
  6724.                         PRINTLN "Your birthdate is ",MKDATE(y,m,d)
  6725.                         IF (MKDATE(y,m,d) < MKDATE(1967,10,31)) THEN
  6726.                           PRINTLN "You are older than me"
  6727.                         ELSE IF (MKDATE(y,m,d) > MKDATE(1967,10,31)) THEN
  6728.                           PRINTLN "I am older than you"
  6729.                         ELSE
  6730.                           PRINTLN "We are the same age"
  6731.                         ENDIF
  6732.  
  6733.                    See Also
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.  
  6740.  
  6741.                           
  6742.  
  6743.                           VARADDR Statement, VAROFF Statement, VARSEG Statement
  6744.